B4J Library SD_VideoStreaming (DEMO)

This library is a rework of the SD_Streaming library which is itself based on a source from @moster67.
You must also download SD_Streaming from here with all its dependencies to work.

NOTE
To the SD_Streaming library it adds a few functions to make some methods simple. In particular, it is not necessary to create an fxml file for the player in case you want to use it to receive a stream. The fxml file is generated automatically when you dock the viewer to a ponel.
This version is demo only and the streaming time is limited to 120 seconds. It will take a few seconds before the stream is sent because it needs to create enough cache.

SD_VideoStreamingDEMO

Author:
Star-Dust
Version: 1.05
  • SD_VideoStream
    • Events:
      • ChangeState (state As Int)
      • Error
      • Prepared
      • ReadyToPlay
      • ReadyToSend
      • SpeedRateChange (Success As Boolean)
    • Functions:
      • CanPause As Boolean
      • Class_Globals As String
      • GetAspectRatio As String
      • getDurate As Long
        millisecond
      • getPlayRate As Float
      • getPosition As Float
        current play position: 0.0-1.0
      • getTime As Long
        current play time
      • getVolume As Int
        Volume = 0-200
      • getZoom As Float
      • Initialize (CallBack As Object, EventName As String) As String
        Initializes the object. You can add parameters to this method if needed.
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • IsPlayable As Boolean
      • IsPlaying As Boolean
      • Mute As String
      • Pause As String
      • Play (source As String)
        Play("rtsp://192.168.1.1:8554/test.mp4")
      • Player As JavaObject
        return Player Object
      • PlayExtra (Options As String(), Source As String) As String
      • Release As String
        release resource
      • SaveCam (filename As String, DegreeRotate As Int) As String
      • SaveDesktop (Savefilename As String) As String
        file .flv
      • SaveDesktopPrimary (Savefilename As String) As String
        file .flv
      • SaveDesktopRect (Savefilename As String, Left As Int, Top As Int, Width As Int, Height As Int) As String
      • setPlaySpeedRate (speedRate As Float) As String
        Raise event SpeedRateChange
      • SetPosition (position As Float) As String
      • setRepeat (Repeat As Boolean) As String
      • setTime (time As Long) As String
      • setVolume (Volume As Int) As String
      • setZoom (factor As Float) As String
        0 for adapter;
      • Skip (delta As Long) As String
        Slip position time long
      • SkipPosition (delta As Float) As String
        Slip position float 0-1
      • Stop As String
      • StreamCam (LocalIP As String, Port As Int, DegreeRotate As Int, external_FileNameMp4 As String) As String
        StreamCam("192.168.1.100","test.mpa",8554,0) or StreamCam("192.168.1.100","test.mpa",8554,180)
        for Play: Play("rtsp://192.168.1.1:8554/test.mp4")
      • StreamDesktop (LocalIP As String, Port As Int, external_FileNameMp4 As String) As String
      • StreamDesktopPrimary (LocalIP As String, Port As Int, external_FileNameMp4 As String) As String
      • StreamDesktopRect (LocalIP As String, Port As Int, external_FileNameMp4 As String, Left As Int, Top As Int, Width As Int, Height As Int) As String
      • StreamFile (LocalFileVideo As String, LocalIP As String, Port As Int, external_FileNameMp4 As String) As String
      • unMute (VolumeLevel As Int) As String
        Volume: 0-200
      • VideoHeight As Double
      • VideoWidth As Double
    • Properties:
      • Durate As Long [read only]
        millisecond
      • PlayRate As Float [read only]
      • PlaySpeedRate
        Raise event SpeedRateChange
      • Repeat
      • Time As Long
        current play time
      • Volume As Int
        Volume = 0-200
      • Zoom As Float
        0 for adapter;
  • StreamSetup
    • Functions:
      • HookPlayer (pNode As Node, VideoPlay As JavaObject) As String
      • LoadLayoput (base As Pane, pNodeName As String, PakageName As String) As Node
      • Process_Globals As String
      • VlcInstalled As Boolean
 

Attachments

  • SD_VideoStreamingDEMO.zip
    13.2 KB · Views: 261
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Update 1.05
  • Now the DEMO version limits to 120 seconds
  • Fixed the example which had a small error
 

amorosik

Expert
Licensed User
Congratulations on your new creation
What exactly are the advantages of this library compared to the one made by @monster67?
Is it for sale or do you provide it for free?
Is the source code available?
If it's for sale, how much does it cost?
 

hzq200409

Member
Licensed User
Hello! Running this example indicates that sd_streamingdemo.jar is missing. Where can I find it?
 

Star-Dust

Expert
Licensed User
Longtime User
Hello! Running this example indicates that sd_streamingdemo.jar is missing. Where can I find it?
Read the first lines of post#1
 

hzq200409

Member
Licensed User
I'm sorry. I repeatedly wandered between these few quotes, but did not find the key issue. I don't know what I'm missing.
 

hzq200409

Member
Licensed User
Sorry again. I've already downloaded it. But I got confused because I downloaded so many files. It's already fine. Thank you for your reply.
 

Star-Dust

Expert
Licensed User
Longtime User
Sorry again. I've already downloaded it. But I got confused because I downloaded so many files. It's already fine. Thank you for your reply.
No problem. This method is not simple.
 

Star-Dust

Expert
Licensed User
Longtime User
Cookies are required to use this site. You must accept them to continue using the site. Learn more…