Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Detect blocking of stream recording VLC
#1
Hello,
Great work Gintaras, keep it going!

I need a way to detect blocking of stream (recording) in VLC. Unfortunately, there is no change in VLC player GUI that detects the blocked stream.
I think a solution is to insert a condition on VLC process that detects network traffic: if the network traffic stops then restart stream playing.
I just need the network traffic part.

Thank you.
#2
To get all network usage can be used class CPerformanceCounter from Collected QM apps, functions, samples
To get network usage of a single process, need to find and install a program or library that can do it. If program, can get the info from its UI using accessible object functions. I tested resmon.exe, it's part of Windows, but its displayed network usage rises and fades too slowly, need to wait maybe 1 minute.
#3
Good enough.
How do I get received (B/sec) of vlc process from network activity or Processes with Network Activity,
because I can see that the process disappears once the streaming stops?

Thanks
#4
Macro Get process network usage from resmon.exe
Code:
Copy      Help
str program="firefox.exe" ;;replace with vlc program name

;if Resource Monitor window not found, run "resmon.exe" and select Network tab. This part may be unreliable, maybe need to wait more.
int w=win("Resource Monitor" "WdcWindow")
if w=0
,run "resmon.exe"
,wait(15 WV win("Resource Monitor" "WdcWindow"))
,2
,w=win("Resource Monitor" "WdcWindow")
,1
,Acc aTab.Find(w "PAGETAB" "Network" "class=SysTabControl32[]id=30100" 0x1005)
,aTab.DoDefaultAction

;every 1 second find the program in the first list, and extract its Receive column
int c=child("" "SysListView32" w) ;;the first listview
rep
,1
,Acc a.Find(c "CHECKBUTTON" program "" 0x15)
,int bytes=0
,if !a.NotFound
,,str s=a.Description; err continue
,,;out s
,,if(findrx(s "\bReceive \(B/sec\): ([^,]+)" 0 0 s 1)<0) end "failed, probably need to edit the regular expression"
,,s.replacerx("\D")
,,;out s
,,bytes=val(s)
,out bytes
#5
I'll give it a try later today.

Thank you
#6
Just what I need.

Thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)