Project

General

Profile

Actions

Feature #191

closed

Add crtmpserver to rootfs

Added by Hammel over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
07 Jul 2013
Due date:
% Done:

100%

Estimated time:
Severity:
03 - Medium

Description

See http://www.rtmpd.com/

svn co --username anonymous --password "" https://svn.rtmpd.com/crtmpserver/branches/1.0 crtmpserver
needs tinyxml-devel headers because builtin tinyxml doesn't build on fedora

This probably nees an init script too, or a script that ties it with the backup camera utilities to start them all at once.


Files

pibox.mk (1.49 KB) pibox.mk Hammel, 18 Jul 2013 14:30
compile.mk (6.04 KB) compile.mk Hammel, 19 Jul 2013 10:41
pibox.mk (1.65 KB) pibox.mk Hammel, 19 Jul 2013 10:41
Actions #1

Updated by Hammel over 10 years ago

  • % Done changed from 0 to 10
Here are some notes on cross compiling crtmpserver. Essentially:
  • copy builders/make/linux.mk to pibox.mk
  • Edit it for toolchain, etc.
  • make PLATFORM=pibox clean
  • make PLATFORM=pibox
    Haven't tried this yet, but it looks like it should work.

I can make this into an opkg build like xbmcbox and just publish the opkg'd binaries.

Actions #2

Updated by Hammel over 10 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Hammel over 10 years ago

First attempt has partial success. Problems with tinyxml again. See attached pibox.mk

To use this
  1. copy attached file to builder/make/pibox.mk
  2. cd builders/make
  3. export TC=/opt/rpiTC
  4. export PATH=$TC/bin:$PATH
  5. make PLATFORM=pibox clean
  6. make PLATFORM=pibox

Results:

arm-unknown-linux-gnueabi-gcc -shared -o ./output/dynamic/liblua.so -fPIC -O3 -Wl,-soname,liblua.so -Wl,-rpath,"\$ORIGIN" ../../3rdparty/lua-dev/ltable.lua.o ../../3rdparty/lua-dev/lapi.lua.o ../../3rdparty/lua-dev/lzio.lua.o ../../3rdparty/lua-dev/lobject.lua.o ../../3rdparty/lua-dev/lstring.lua.o ../../3rdparty/lua-dev/lauxlib.lua.o ../../3rdparty/lua-dev/lstrlib.lua.o ../../3rdparty/lua-dev/ldump.lua.o ../../3rdparty/lua-dev/lopcodes.lua.o ../../3rdparty/lua-dev/ldebug.lua.o ../../3rdparty/lua-dev/llex.lua.o ../../3rdparty/lua-dev/linit.lua.o ../../3rdparty/lua-dev/ltablib.lua.o ../../3rdparty/lua-dev/liolib.lua.o ../../3rdparty/lua-dev/lundump.lua.o ../../3rdparty/lua-dev/ldo.lua.o ../../3rdparty/lua-dev/lmem.lua.o ../../3rdparty/lua-dev/lcode.lua.o ../../3rdparty/lua-dev/loslib.lua.o ../../3rdparty/lua-dev/loadlib.lua.o ../../3rdparty/lua-dev/lmathlib.lua.o ../../3rdparty/lua-dev/ltm.lua.o ../../3rdparty/lua-dev/lbaselib.lua.o ../../3rdparty/lua-dev/lparser.lua.o ../../3rdparty/lua-dev/lvm.lua.o ../../3rdparty/lua-dev/lgc.lua.o ../../3rdparty/lua-dev/ldblib.lua.o ../../3rdparty/lua-dev/lfunc.lua.o ../../3rdparty/lua-dev/lstate.lua.o
arm-unknown-linux-gnueabi-g++ -fPIC -O3 -DLINUX -DLITTLE_ENDIAN_BYTE_ALIGNED -DNET_EPOLL -DCreateRTCPPacket=CreateRTCPPacket_mystyle_only_once -DFeedDataAudioMPEG4Generic=FeedDataAudioMPEG4Generic_one_by_one -DHandleTSVideoData=HandleVideoData_version3 -DHAS_PROTOCOL_HTTP -DHAS_PROTOCOL_RTMP -DHAS_PROTOCOL_LIVEFLV -DHAS_PROTOCOL_RTP -DHAS_PROTOCOL_TS -DHAS_PROTOCOL_VAR -DHAS_LUA -DHAS_MEDIA_MP3 -DHAS_MEDIA_MP4 -DHAS_MEDIA_FLV -I../../3rdparty/lua-dev -I../../3rdparty/tinyxml -I/home/mjhammel/src/ximba/raspberrypi/bld/buildroot-2013.02/output/staging/include -I../../sources/common/include -c ../../3rdparty/tinyxml/tinyxmlparser.cpp -o ../../3rdparty/tinyxml/tinyxmlparser.tinyxml.o
../../3rdparty/tinyxml/tinyxmlparser.cpp: In static member function 'static const char* TiXmlBase::GetEntity(const char*, char*, int*, TiXmlEncoding)':
../../3rdparty/tinyxml/tinyxmlparser.cpp:407:9: error: 'ptrdiff_t' was not declared in this scope
../../3rdparty/tinyxml/tinyxmlparser.cpp:407:9: note: suggested alternatives:
/opt/rpiTC/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.4/../../../../arm-unknown-linux-gnueabi/include/c++/4.6.4/arm-unknown-linux-gnueabi/bits/c++config.h:156:28: note: 'std::ptrdiff_t'
/opt/rpiTC/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.4/../../../../arm-unknown-linux-gnueabi/include/c++/4.6.4/arm-unknown-linux-gnueabi/bits/c++config.h:156:28: note: 'std::ptrdiff_t'
../../3rdparty/tinyxml/tinyxmlparser.cpp:407:19: error: expected ';' before 'delta'
../../3rdparty/tinyxml/tinyxmlparser.cpp:419:13: error: 'delta' was not declared in this scope
../../3rdparty/tinyxml/tinyxmlparser.cpp:443:13: error: 'delta' was not declared in this scope
../../3rdparty/tinyxml/tinyxmlparser.cpp:462:20: error: 'delta' was not declared in this scope
make: *** [../../3rdparty/tinyxml/tinyxmlparser.tinyxml.o] Error 1

Actions #4

Updated by Hammel over 10 years ago

Additional cross compile information which may or may not be applicable to current SVN of crtmpserver:
https://github.com/mdavid/crtmpserver/blob/master/docs/toolchains.txt

Actions #5

Updated by Hammel over 10 years ago

  • % Done changed from 10 to 20

This doesn't appear to work any better, so I'm going back to the pibox.mk method.

I want to disable building of tinyxml and have the build just use the tinyxml available in the staging tree of buildroot. To do this I need to edit compile.mk:
  1. Change TINYXML_INCLUDE to point to the staging tree header location
  2. Change the tinyxml target to a no-op
  3. Fix the crtmpserver target to use the staging library for crtmpserver instead of the tinyxml_objs.
  4. Possibly fix the tests target. Not sure what to do with this one yet. Maybe just take out the TINYXML_OBJS and replace with a symlink to the tinyxml.so in the staging tree, but that seems doubtful.
Actions #6

Updated by Hammel over 10 years ago

I got a cross compile to work. The modified compile.mk and new pibox.mk are attached. To build this, I export TC=/opt/rpiTC first so that pibox.mk picks up the head of the installed toolchain. This will need additional tweaking to put it into a metabuild like xbmcbox, but at least I know it's possible. I'll probably apply a patch to compile.mk and set TC and STAGING before running the build.

I've not tested this on the target yet.

Actions #7

Updated by Hammel over 10 years ago

  • % Done changed from 30 to 50

I migrated the test cross-build to its own repository (see RM #202)
https://gitorious.org/crtmpserver

I have the build and packaging completed, but neither is tested on the target yet.

Actions #8

Updated by Hammel over 10 years ago

  • % Done changed from 50 to 80

Created custom config file that allows crtmpserver to start up without ssl keys. Startup appears okay but its
unclear if feeding it data or retrieving data from it work correctly. That's still to be tested.

Current code base is pushed upstream.

Actions #9

Updated by Hammel over 10 years ago

  • Priority changed from High to Immediate
  • Severity changed from 01 - Critical to 03 - Medium
Actions #10

Updated by Hammel over 10 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

It works, but audio is sketchy. I put the bunny.flv file on the Pi and started crtmpserver then opened http://dl.dropboxusercontent.com/u/2918563/flvplayback.swf on my desktop and connected to the Pi. crtmpserver showed available files and played bunny.flv.

For the web cam it may work just fine.

I just pushed the updated config and postinst scripts. The crtmpserver package is ready for testing with a web server and the webcam.

Actions

Also available in: Atom PDF