sudo apt-get install git cmake build-essential libavahi-client-dev libsqlite3-dev chromium-browser libssl-dev libudev-dev libgtest-dev libbluetooth3 libbluetooth-dev bluez-tools gstreamer1.0* libpulse-dev
sudo apt-get update sudo apt-get upgrade sudo ldconfig
Clone the SDL Core repository
git clone https://github.com/smartdevicelink/sdl_core.git
CD into sdl_core/ and checkout the master branch
git checkout origin/master
Clone the Web HMI repository
git clone https://github.com/smartdevicelink/sdl_hmi.git
CD into sdl_hmi/ and checkout the master branch
git checkout origin/master
Create build folder outside of sdl_core/ directory
mkdir build cd build
Run CMAKE and install application
cmake ../sdl_core make make install
First, we must determine what gstreamer command works in your environment
Start by finding a raw h.264 file (Example) and determine which of the these gstreamer commands sucessfully plays the example video
gst-launch-1.0 filesrc location=/path/to/h264/file ! decodebin ! videoconvert ! xvimagesink sync=false
or
gst-launch-1.0 filesrc location=/path/to/h264/file ! decodebin ! videoconvert ! ximagesink sync=false
If you're using tcp, you can connect the stream directly with your phones ip address using
gst-launch-1.0 tcpclientsrc host=<Device IP Address> port=3000 ! decodebin ! videoconvert ! ximagesink sync=false
In the build folder directory, open bin/smartDeviceLink.ini in a text editor and the make the following changes:
;VideoStreamConsumer = socket ;AudioStreamConsumer = socket ;VideoStreamConsumer = file ;AudioStreamConsumer = file VideoStreamConsumer = pipe AudioStreamConsumer = pipe
Using pipe streaming may require a modification to the SDL HMI.
After you start SDL Core, cd into the bin/storage directory and there should be a file named "video_stream_pipe". Use the gst-launch command that worked for your environment and set file source to the video_stream_pipe file. You should see “setting pipeline to PAUSED” and “Pipeline is PREROLLING”.
gst-launch-1.0 filesrc location=$SDL_BUILD_PATH/bin/storage/video_stream_pipe ! decodebin ! videoconvert ! xvimagesink sync=false
gst-launch-1.0 filesrc location=$SDL_BUILD_PATH/bin/storage/video_stream_pipe ! "application/x-rtp-stream" ! rtpstreamdepay ! "application/x-rtp,media=(string)video,clock-rate=90000,encoding-name=(string)H264" ! rtph264depay ! "video/x-h264, stream-format=(string)avc, alignment=(string)au" ! avdec_h264 ! videoconvert ! ximagesink sync=false
gst-launch-1.0 filesrc location=$SDL_BUILD_PATH/bin/storage/audio_stream_pipe ! audio/x-raw,format=S16LE,rate=16000,channels=1 ! pulsesink
In the build folder directory, open bin/smartDeviceLink.ini
in a text editor and the make the following changes:
; Socket ports for video and audio streaming VideoStreamingPort = 5050 AudioStreamingPort = 5080 ... VideoStreamConsumer = socket AudioStreamConsumer = socket ;VideoStreamConsumer = file ;AudioStreamConsumer = file ;VideoStreamConsumer = pipe ;AudioStreamConsumer = pipe
Using socket streaming may require a modification to the SDL HMI.
Comment out the following lines in app/model/sdl/Abstract/Model.js
:
// SDL.SDLModel.playVideo(appID);
Comment out the following lines in app/model/sdl/Abstract/Model.js
:
// SDL.StreamAudio.play( // SDL.SDLController.getApplicationModel(appID).navigationAudioStream // );
gst-launch-1.0 souphttpsrc location=http://127.0.0.1:5050 ! decodebin ! videoconvert ! xvimagesink sync=false
gst-launch-1.0 souphttpsrc location=http://127.0.0.1:5050 ! "application/x-rtp-stream" ! rtpstreamdepay ! "application/x-rtp,media=(string)video,clock-rate=90000,encoding-name=(string)H264" ! rtph264depay ! "video/x-h264, stream-format=(string)avc, alignment=(string)au" ! avdec_h264 ! videoconvert ! ximagesink sync=false
gst-launch-1.0 souphttpsrc location=http://127.0.0.1:5080 ! audio/x-raw,format=S16LE,rate=16000,channels=1 ! pulsesink
In the build folder
cd bin ./start.sh
If you want to use a USB connection, you must run
sudo ./start.sh
CD into the HMI repository and run
chromium-browser index.html
No open source mobile application currently implements video streaming.