1 Replies - 353 Views - Last Post: 19 September 2017 - 03:22 PM Rate Topic: -----

#1 hanna212  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-September 17

vb6 set useragent for vlc player?

Posted 18 September 2017 - 05:19 PM

May I kindly ask how I would go around setting up my own custom user-agent in vlc control in Visual Basic 6?

Private Sub Command1_Click()
    Set vlcControl = Controls.Add("VideoLAN.VLCPlugin.2", "vlcControl")
    vlcControl.Height = 6000
    vlcControl.Width = 5000
    Set vlcPlayer = vlcControl.object
    vlcControl.Visible = True
    ReqVideo = Text1.Text
    vlcControl.object.playlist.Add ((ReqVideo))
    vlcControl.object.playlist.play
    vlcPlayer.audio.Volume = 1
End Sub


In Wireshark I see:
User-Agent: LibVLC/2.2.6 (LIVE555 Streaming Media v2016.02.22)\r\n

How can I change this? I'm also using rtsp://r2- server for video.

i found this https://github.com/c...tance.UserAgent
libvlc.VLCInstance.UserAgent
Property declaration

Dim UserAgent As String

Remarks

Gets and sets the HTTP user-agent string of the application.

http://docsforge.com...n-setUserAgent/

void VlcInstance::setUserAgent(const QString &application,
                               const QString &version)
{
    QString applicationOutput = application + " " + version;
    QString httpOutput = application + "/" + version + " " + "VLC-Qt" + "/" + libVersion(); // "AppName/1.2.3 VLC-Qt/1.2.3"
    libvlc_set_user_agent(_vlcInstance, applicationOutput.toUtf8().data(), httpOutput.toUtf8().data());
}


Is This A Good Question/Topic? 0
  • +

Replies To: vb6 set useragent for vlc player?

#2 hanna212  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-September 17

Re: vb6 set useragent for vlc player?

Posted 19 September 2017 - 03:22 PM

am trying to send rtsp packet which i sniffed using soft perfect network protocol anyalyzer software.

now within the soft perfect network protocol anyalyzer software. i can send 1 packet no problem but when i use vb6 to send that packet, it sends but i get bad request , i use wire-shark to se the status of server replies and packets.


Posted Image
22E6C9B51C2D9AFC2A3686550800450001AE49E540008006FD47C0A82AEBADC218C76BF4022AFB6473E626AF91A650183F1701A50000534554555020727473703A2F2F72312D2D2D736E2D7134666C366E657A2E676F6F676C65766964656F2E636F6D2F436A304C454E7937337749614E416B4F437A365846706E6A53784D594453414E464332666F38425A4D4F436F41554941534152676E2D665337504C7A714F425A6967454C5A47394A62444E30626B35684D566B4D2F303646464437304130314543393643414630313833443245314245333736373936393534324231322E413831443837384233343535433632343338444136463531304138354132334539414432383841412F7974362F312F766964656F2E3367702F747261636B49443D3120525453502F312E300D0A435365713A20340D0A557365722D4167656E743A204D506C6179657220284C4956453535352053747265616D696E67204D656469612076323031332E30342E3330290D0A5472616E73706F72743A205254502F4156503B756E69636173743B636C69656E745F706F72743D35343437302D35343437310D0A53657373696F6E3A2036313761316531320D0A0D0A


Private Sub Command2_Click()
 Winsock1.Close
   Winsock1.LocalPort = 27636
   Winsock1.RemoteHost = "173.194.24.199"  
   Winsock1.RemotePort = 554               
   Winsock1.Connect
  
End Sub
 
Private Sub Winsock1_Connect()
 Winsock1.SendData Text1.Text
End Sub




and when i capture the sent packet using wire shark this is what i se
Posted Image
please help

or am i suppose to send the unicode data with it ?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1