-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite RTSP server #372
base: master
Are you sure you want to change the base?
Rewrite RTSP server #372
Commits on Feb 13, 2024
-
step 0: make room for the rebuilt implementation
- so that code can be established upon existing example in Live555. - Result will look simmilar to this, but will be rebuild as series of logical steps
Configuration menu - View commit details
-
Copy full SHA for fb51852 - Browse repository at this point
Copy the full SHA fb51852View commit details -
step 1: import example from Live555 library
- that will be base of rtsp server - file originaly located in Live555 library source code at testProgs/testOnDemandRTSPServer.cpp
Configuration menu - View commit details
-
Copy full SHA for cac2c9a - Browse repository at this point
Copy the full SHA cac2c9aView commit details -
step 1: rename file and add UG copyright
copyright notice was added from original file BasicRTSPOnlyServer.cpp
Configuration menu - View commit details
-
Copy full SHA for d36678f - Browse repository at this point
Copy the full SHA d36678fView commit details -
step 1: remove http(s) tunneling and TLS
these features are not used needed by UltraGrid
Configuration menu - View commit details
-
Copy full SHA for 3820168 - Browse repository at this point
Copy the full SHA 3820168View commit details -
step 1: drop unused media formats, keep MPEG-4
MPEG-4 video is not deleted because it can serve as example of handling subsessions
Configuration menu - View commit details
-
Copy full SHA for ba1e3f4 - Browse repository at this point
Copy the full SHA ba1e3f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e061430 - Browse repository at this point
Copy the full SHA e061430View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93bb022 - Browse repository at this point
Copy the full SHA 93bb022View commit details -
step 2: add rtsp server class, typedef to og name
- basic structure for UltragridRTSPServer class - make copying not possible because server can't be copied - add typedef reference to name used in previous implementation
Configuration menu - View commit details
-
Copy full SHA for 55a9f71 - Browse repository at this point
Copy the full SHA 55a9f71View commit details -
step 2: move initialization logic to constructor
move inicialization logic from main() to constructor of new class
Configuration menu - View commit details
-
Copy full SHA for 56af87b - Browse repository at this point
Copy the full SHA 56af87bView commit details -
step 2: import announceURL function from Live555
- copied announceURL function from Live555 library at testProgs/announceURL.cpp - copied becase is functional and searchable for future modifications - function handles displaying url, that server listens on, to comandline
Configuration menu - View commit details
-
Copy full SHA for 91113c4 - Browse repository at this point
Copy the full SHA 91113c4View commit details -
step 2: add announceURL to class
move announceURL function to class so funcitonality is more clear
Configuration menu - View commit details
-
Copy full SHA for b3435b4 - Browse repository at this point
Copy the full SHA b3435b4View commit details -
step 3: create base for media subsessions
they will serve as container for various media transmitted by UG
Configuration menu - View commit details
-
Copy full SHA for cdc7d9f - Browse repository at this point
Copy the full SHA cdc7d9fView commit details -
step 3: repsesent UG rtp payload as subsession
- add basic structure for UltragridRTSPSubsessionCommon class - add typedef reference to name used in previous implementation
Configuration menu - View commit details
-
Copy full SHA for 016f995 - Browse repository at this point
Copy the full SHA 016f995View commit details -
step 3: inherit Live555 subsession functionality
- add definitions for all needed functions - ServerMediaSubsession is chosen because it is common ancestor in Live555's subsessions
Configuration menu - View commit details
-
Copy full SHA for 558058d - Browse repository at this point
Copy the full SHA 558058dView commit details -
step 3: provide a mechanism to direct media stream
function redirectStream changes destination adress and port in UG module sender
Configuration menu - View commit details
-
Copy full SHA for a4c52d7 - Browse repository at this point
Copy the full SHA a4c52d7View commit details -
step 3: implement RTSP playback control
- starts stream by changing destination adress and port to the ones got in function getStreamParameters - deletes stream by changing destination address and port to localhost
Configuration menu - View commit details
-
Copy full SHA for 11b3012 - Browse repository at this point
Copy the full SHA 11b3012View commit details -
step 4: instantiate subsession for audio and video
- inherits from UltragridRTSPSubsessionCommon because implementation of needed functions (by ServerMediaSubsession) is the same - exept for SDP Lines which are added later - Factory method (createNew) is used because Live555 library needs pointer to structure and all subsessions in Live555 library are created this way
Configuration menu - View commit details
-
Copy full SHA for 22db40c - Browse repository at this point
Copy the full SHA 22db40cView commit details -
step 4: specify modules for directing media stream
- Tell UG what modules shoud be notified when changing direction of media stream - MODULE_CLASS_SENDER - controls video stream - MODULE_CLASS_AUDIO - controls audio stream - MODULE_CLASS_NONE - only used as stop (like \0 in string)
Configuration menu - View commit details
-
Copy full SHA for fd129c8 - Browse repository at this point
Copy the full SHA fd129c8View commit details -
step 4: generate SDP description of media stream
Generate description of provided media according to SDP protocol defined in RFC 8866 with modifications for RTSP protocol defined in RFC 2326
Configuration menu - View commit details
-
Copy full SHA for a0e319b - Browse repository at this point
Copy the full SHA a0e319bView commit details -
step 5: add way to specify port for rtsp server
- if user don't specify port number default 8554 will be used - Live555 does not have mechanism to tell if port is already in use so user must specify available port
Configuration menu - View commit details
-
Copy full SHA for d044850 - Browse repository at this point
Copy the full SHA d044850View commit details -
step 5: add supported media types, rename refs
in previous version of rtsp_utils.h file the struct was named differently so all references have to be renamed
Configuration menu - View commit details
-
Copy full SHA for 1daa3c4 - Browse repository at this point
Copy the full SHA 1daa3c4View commit details -
step 5: instantiate subsessions for rtsp server
replace MPEG-4 example with new subsessions made for UG
Configuration menu - View commit details
-
Copy full SHA for ec1b85a - Browse repository at this point
Copy the full SHA ec1b85aView commit details -
step 5: extract starting server from constructor
- serverStopFlag if set to 0 server is running when set to 1 it stops - serverRunner built so it can be launched from pthread_create - destructor cleans memory
Configuration menu - View commit details
-
Copy full SHA for 8489d12 - Browse repository at this point
Copy the full SHA 8489d12View commit details -
step 6: add files to host rtsp server management
they will be used by UG to interface with rtsp server
Configuration menu - View commit details
-
Copy full SHA for 5f5662d - Browse repository at this point
Copy the full SHA 5f5662dView commit details -
step 6: class to manage rtsp server
- basic structure of ultragrid_rtsp class - it provides control of rtsp server
Configuration menu - View commit details
-
Copy full SHA for 0d146ff - Browse repository at this point
Copy the full SHA 0d146ffView commit details -
step 6: start and stop server thread
- new thread is created for rtsp server because control flow needs to be given to Live555 - server stops by setting server_stop_flag to 1 - char is used because it is needed by Live555 library - because rtsp server does not need to know about threads two 'runner' functions are used to separate server and threads
Configuration menu - View commit details
-
Copy full SHA for 244370c - Browse repository at this point
Copy the full SHA 244370cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 23665b1 - Browse repository at this point
Copy the full SHA 23665b1View commit details -
step 7: remove Live555 library version check
new implementation is built on version 2023.11.30 of Live555
Configuration menu - View commit details
-
Copy full SHA for b0743d3 - Browse repository at this point
Copy the full SHA b0743d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7e1c5d - Browse repository at this point
Copy the full SHA e7e1c5dView commit details -
step 7: override number of channels for OPUS
- OPUS does not support mono - RFC 7587 specifies that in SDP number of channels must be 2
Configuration menu - View commit details
-
Copy full SHA for c536024 - Browse repository at this point
Copy the full SHA c536024View commit details -
step 7: remove unused parameter
- in previous implementation parameter audio_bps was used in initialization of rtsp server but was not used internally - it is kept in the process of creating new implementaion (git commits) for reference with previous implementaion
Configuration menu - View commit details
-
Copy full SHA for f7c559d - Browse repository at this point
Copy the full SHA f7c559dView commit details