[Live-devel] waiting for SPS/PPS

Matthew Czarnek mczarnek at edge360.com
Mon Jul 6 09:00:57 PDT 2020


Hey Chris, sure I'll share how to do it now quickly.

I got the CMake file working so that it creates a Visual Studio solution
that allows you to compile openRTSP, could easily be changed to run other
test programs. In order to run it with my own code, I then created my own
class that subclassed FramedSource and allowed me to use my own subclass
along with the live555 RTSPServer. Would take me a little bit to remember
everything I did there to get it working. But also got it working via CMake
(plus lots of work on top of that within Visual Studio).  Oh and if you are
considering something other than live555.. I started with ffmpeg, however
it turned out that I got more than 10x lower CPU usage and much less memory
too using live555 as an RTSP server.  I'd definitely recommend it.

You'll want to download and set up the CMake tool and run the GUI:
https://cmake.org/runningcmake/

Set the source code path to the directory that includes the CMakeLists.txt
file(must be named CMakeLists.txt) that is used to build the solution. Set
the Build path to the location you want the VS Solution and project files
to be output.

Good luck, let me know if you have any CMake questions.
Matt


This is the CMakeLists.txt file I used:
----------------------------------------------------------------------------------------------------------------------------------
#CMake file for compiling openRTSP RTSP client
cmake_minimum_required(VERSION 3.10.2)
project(LIVE555)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -Wall
-fexceptions -DXLOCALE_NOT_USED=1 -DNULL=0 -DNO_SSTREAM=1
-DSOCKLEN_T=socklen_t -UIP_ADD_SOURCE_MEMBERSHIP")

#live555 include directories
include_directories(
        src/BasicUsageEnvironment/include
        src/liveMedia/include
        src/groupsock/include
        src/UsageEnvironment/include
)

AUX_SOURCE_DIRECTORY(src/BasicUsageEnvironment BasicUsageEnvironmentSources)
AUX_SOURCE_DIRECTORY(src/liveMedia liveMediaSources)
AUX_SOURCE_DIRECTORY(src/groupsock groupsockSources)
AUX_SOURCE_DIRECTORY(src/UsageEnvironment UsageEnvironmentSources)

#live555 LiveMedia
set(LIVE555_SOURCES
        ${BasicUsageEnvironmentSources}
        ${groupsockSources}
        ${liveMediaSources}
        ${UsageEnvironmentSources}
        )

add_library(LIVE555 STATIC ${LIVE555_SOURCES})

if(WIN32)
add_executable(live555_openRTSP_Project src/testProgs/openRTSP.cpp
src/testProgs/playCommon.cpp)
#add_executable(live555_openRTSP_Project WIN32 src/testProgs/openRTSP.cpp
src/testProgs/playCommon.cpp)
#set_property(TARGET live555_openRTSP_Project PROPERTY WIN32_EXECUTABLE
true)
set_property(TARGET live555_openRTSP_Project PROPERTY MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
add_executable(live555_openRTSP_Project src/testProgs/openRTSP.cpp
src/testProgs/playCommon.cpp)
endif()

 target_include_directories(live555_openRTSP_Project PUBLIC
        src/basicusageenvironment/include
        src/livemedia/include
        src/groupsock/include
        src/usageenvironment/include
)

target_link_libraries(live555_openRTSP_Project LIVE555)

if(WIN32)
target_link_libraries(live555_openRTSP_Project wsock32 Ws2_32)
endif()

#target_link_libraries(XXX LIVE555)
----------------------------------------------------------------------------------------------------------------------------------


On Mon, Jul 6, 2020 at 10:24 AM Chris Paucar <chris.paucar at roc-connect.com>
wrote:

> Hi Matthew,
>
> I’m considering a VS Code setup for LIVE555. I’d be interested in what you
> come up with.
>
> Thanks,
> Chris
>
> On Mon, Jul 6, 2020 at 10:05 AM Matthew Czarnek <mczarnek at edge360.com>
> wrote:
>
>> It appears Visual Studio does support Makefiles through the use of
>> 'nmake' but I don't believe (I could be wrong.. I'd love it if someone knew
>> otherwise) that Visual Studio can be used to open the makefile as a
>> project. However, it is possible to use CMake to do so. Which I personally
>> find to be quite handy for debugging purposes and understanding what's
>> going on behind the covers when my code interacts with Live555.
>>
>> I'd recommend letting me whip up instructions for building using CMake to
>> generate a LIVE555 VS project once I'm finished with my current deadline at
>> work. Windows support seems important to me.
>>
>> On Thu, Jul 2, 2020 at 6:00 PM Ross Finlayson <finlayson at live555.com>
>> wrote:
>>
>>>
>>>
>>> > On Jul 3, 2020, at 7:08 AM, Matthew Czarnek <mczarnek at edge360.com>
>>> wrote:
>>> >
>>> > Heads up, the build instructions found here don't work:
>>> http://www.live555.com/liveMedia/#config-windows
>>> >
>>> > Visual Studio 2019 doesn't have a "Open Workspace" option. Or any
>>> other way of opening mak files that seems to do it.
>>>
>>> Makefiles have been the standard way to develop systems software for
>>> almost 40 years now.  If “Visual Studio 2019” does not support Makefiles,
>>> then I’ll probably just remove (and undocument) all support for building
>>> this code on Windows.
>>>
>>> (Support for building the code *for* Windows will likely remain,
>>> although even that isn’t guaranteed indefinitely.)
>>>
>>>
>>> Ross Finlayson
>>> Live Networks, Inc.
>>> http://www.live555.com/
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20200706/f210f957/attachment-0001.htm>


More information about the live-devel mailing list