• 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 58
xbmc minified as a server?
(2012-11-02, 19:51)Tom. Wrote: Oh yeh, you'll probably want to delete the newer database version so when you do update your clients, the database will be updated again with the latest info, like play counts etc

Thanks Tom, helpful.

Please excuse my stupity, but I am trying to get the xbmc-server portion working. What I've done, created a directory under the cloned one called "xbmc-server", copied the 'xbmc-server.cpp' from post #108 and 'Makefile' from post #85 and I am now recompiling with the usual. I'm assuming this will produced the minified server binary?

Edit: realized it was the spaces in the Makefile causing issues
Reply
From the looks of it, you just cd into that directory and run

Code:
make all


Not tried it myself though so could be wrong
Reply
This has gone beyond infuriating.

Now there's a missing separator on line 12. I have absolutely no idea in hell what that means.

xbmc-server makefile

Code:
SOURCES := xbmc-server.cpp

LFLAGS += -lxbmc -L..

# Objs are all the sources, with .cpp replaced by .o
OBJS := $(SOURCES:.cpp=.o)

all: xbmc-server
        include ../Makefile.include

xbmc-server: $(OBJS)
    $(CC) $(CFLAGS) -o xbmc-server $(OBJS) $(LFLAGS) $(LIBS)

# Get a .o from a .cpp by calling compiler with cflags and includes (if defined)
.cpp.o:
    $(CC) $(CFLAGS) $(INCLUDES) -c $<

All I wanted was a quick and easy tool to scan the library on my NAS. Not weeks of feeling stupid and f**king up my OS.
Reply
(2012-11-02, 22:06)Bootlegninja Wrote: This has gone beyond infuriating.

Now there's a missing separator on line 12. I have absolutely no idea in hell what that means.

xbmc-server makefile

Code:
SOURCES := xbmc-server.cpp

LFLAGS += -lxbmc -L..

# Objs are all the sources, with .cpp replaced by .o
OBJS := $(SOURCES:.cpp=.o)

all: xbmc-server
        include ../Makefile.include

xbmc-server: $(OBJS)
    $(CC) $(CFLAGS) -o xbmc-server $(OBJS) $(LFLAGS) $(LIBS)

# Get a .o from a .cpp by calling compiler with cflags and includes (if defined)
.cpp.o:
    $(CC) $(CFLAGS) $(INCLUDES) -c $<

All I wanted was a quick and easy tool to scan the library on my NAS. Not weeks of feeling stupid and f**king up my OS.

almost there dude, make sure that you have tabs before the $(CC).. not spaces.. and make sure u copy Makefile (will overwrite existing, so backup) and xbmc-server.cpp in the xbmc tree and type "make all"
Reply
(2012-11-02, 22:10)joelones Wrote:
(2012-11-02, 22:06)Bootlegninja Wrote: This has gone beyond infuriating.

Now there's a missing separator on line 12. I have absolutely no idea in hell what that means.

xbmc-server makefile

Code:
SOURCES := xbmc-server.cpp

LFLAGS += -lxbmc -L..

# Objs are all the sources, with .cpp replaced by .o
OBJS := $(SOURCES:.cpp=.o)

all: xbmc-server
        include ../Makefile.include

xbmc-server: $(OBJS)
    $(CC) $(CFLAGS) -o xbmc-server $(OBJS) $(LFLAGS) $(LIBS)

# Get a .o from a .cpp by calling compiler with cflags and includes (if defined)
.cpp.o:
    $(CC) $(CFLAGS) $(INCLUDES) -c $<

All I wanted was a quick and easy tool to scan the library on my NAS. Not weeks of feeling stupid and f**king up my OS.

almost there dude, make sure that you have tabs before the $(CC).. not spaces.. and make sure u copy Makefile (will overwrite existing, so backup) and xbmc-server.cpp in the xbmc tree and type "make all"

thank you. Although when I do make all, it essentially says nothing to do. I named the makefile make_xbmc-server and ran make -f make_xbmc-server all and it finally compiled fine.

My gdb output was small so It's getting posted here.

Code:
root@server:/opt/xbmc# gdb ./xbmcVideoLibraryScan
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/xbmc/xbmcVideoLibraryScan...done.
(gdb) r
Starting program: /opt/xbmc/xbmcVideoLibraryScan
[Thread debugging using libthread_db enabled]
Can't open display
[New Thread 0x7fffea480700 (LWP 21616)]
[New Thread 0x7fffe9844700 (LWP 21617)]
[New Thread 0x7ffff7e90700 (LWP 21618)]
[Thread 0x7ffff7e90700 (LWP 21618) exited]
XBMC Media Center 12.0-ALPHA7 Git:20121030-28ca9a4
Copyright (C) 2005-2011 Team XBMC - http://www.xbmc.org

Starting Video Library Scan

[New Thread 0x7fffe898c700 (LWP 21619)]
[New Thread 0x7fffe3fff700 (LWP 21620)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe898c700 (LWP 21619)]
0x00007ffff5fa5f64 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb)
Reply
you need to enter "bt full" after "r" to get the trace, question why would you need xbmcVideoLibraryScan if you can run xbmc as a server and accept library updates via json?
Reply
So, I ended up with MyVideos72 again not 68, thought this was the hash I had to checkout to

Code:
xbmc@margerie:~/.xbmc$ sudo apt-cache policy xbmc
xbmc:
  Installed: 2:12.0~git20121006.1450-[b]af30ed9[/b]-0quantal
  Candidate: 2:12.0~git20121006.1450-af30ed9-0quantal
  Version table:

Code:
git checkout af30ed9
error: pathspec 'af30ed9' did not match any file(s) known to git.

guess i'll just go by date
Reply
*deleted*
Reply
So I went back to Oct 6 (git checkout 228f93a), but the ./configure --enable-shared-lib is bombing:

Quote:...
hecking for SQLITE3... yes
checking for PNG... yes
checking for PCRE... yes
checking for CDIO... yes
checking for SAMPLERATE... yes
checking for MMS... no
configure: error: Could not find a required library. Please see the README for your platform.

Edit: Nevermind guess something funky happened. Compiles now.
Reply
here's the full gdb output. Sorry. I thought I posted it before I left for a bit. My winblows system loves messing with me sometimes.

Code:
root@server:/opt/xbmc# gdb ./xbmcVideoLibraryScan
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/xbmc/xbmcVideoLibraryScan...done.
(gdb) r
Starting program: /opt/xbmc/xbmcVideoLibraryScan
[Thread debugging using libthread_db enabled]
Can't open display
[New Thread 0x7fffea480700 (LWP 23047)]
[New Thread 0x7fffe9844700 (LWP 23049)]
[New Thread 0x7ffff7e90700 (LWP 23050)]
[Thread 0x7ffff7e90700 (LWP 23050) exited]
XBMC Media Center 12.0-ALPHA7 Git:20121030-28ca9a4
Copyright (C) 2005-2011 Team XBMC - http://www.xbmc.org

Starting Video Library Scan

[New Thread 0x7fffe898c700 (LWP 23051)]
[New Thread 0x7fffe3fff700 (LWP 23052)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe898c700 (LWP 23051)]
0x00007ffff5fa5f64 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) bt
#0  0x00007ffff5fa5f64 in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0x00007ffff72d7387 in XbmcThreads::pthreads::RecursiveMutex::lock (
    this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/platform/pthreads/CriticalSection.h:49
#2  XbmcThreads::CountingLockable<XbmcThreads::pthreads::RecursiveMutex>::lock
    (this=0x0, strTitle=...) at /home/bootleg/xbmc/xbmc/threads/Lockables.h:59
#3  UniqueLock (this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/Lockables.h:116
#4  CSingleLock (this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/SingleLock.h:37
#5  CGUIDialogExtendedProgressBar::GetHandle (this=0x0, strTitle=...)
    at GUIDialogExtendedProgressBar.cpp:75
#6  0x00007ffff703a909 in VIDEO::CVideoInfoScanner::Process (this=0x612560)
    at VideoInfoScanner.cpp:89
#7  0x00007ffff7857c60 in CThread::Action (this=0x612560) at Thread.cpp:218
#8  0x00007ffff7858621 in CThread::staticThread (data=<value optimized out>)
    at Thread.cpp:128
#9  0x00007ffff5fa38ca in start_thread () from /lib/libpthread.so.0
#10 0x00007ffff6288b6d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()
(gdb)
Reply
(2012-11-02, 17:22)bladesuk1 Wrote: a headless server is what most people want from this: a way to have access to the media library, to update it, to be able to send notifications to it via sickbeard, couchpotato, and so on. it's for people who have multiple xbmc clients around a home network, and want some way to centralise that library. by necessity, that involves a mysql back-end database. that necessitates the database library updates, and the functionality of searching, scraping, updating and otherwise manipulating the media library, as well as the code to access this functionality e.g. the json interface, the http communications layer, and so on. in actuality, that's a massive chunk of the functionality of xbmc - pretty much everything except the gui front-end.

it's probably also worth pointing out that frodo is currently in active development, so you're complaining about something not working when one of its dependencies is being actively worked on at the moment. to use your car analogy, they're still building the wiring loom, and you're complaining that you can't listen to the radio. i don't think that's a fair criticism.

having personally dealt with the developers over an extended period of time - particularly with reference to this actual piece of code - and having been involved with this particular server mode discussion from the beginning (given that i *started* it: http://forum.xbmc.org/showthread.php?tid=105449 and later http://forum.xbmc.org/showthread.php?tid=114612 with some actual code as an alternative solution) i won't stay silent in the face of that because they've been helpful, responsive, and actually given us what we've asked for at each and every step of the way, and even built something that wasn't in their priorities into the mainline code for us. all it took was some effort from a bunch of us to put together a working patch to give us what we wanted.

fyi, robotica's 'method' is the same as vajonam's eden patch (890) - which is a rebased version of my initial code (542) (including plenty of helpful fixes from Odon who i've noticed in this thread too - hi again!) that he pulled together and cleaned up while i was dealing with some stuff offline. for the record, that's got even more of the xbmc application gubbins in there than the library solution because it's nothing more than a couple of inline code switches to disable elements of the gui based on a startup parameter. as it stands, there are some elements of the gui still enabled in the eden-server codebase because the xbmc scanners were relying on the gui being present. it's nothing more than a very nasty hack to the eden codebase - albeit one that i'm proud of, as it was my first effort at contributing to xbmc, and many people out there have found it useful. what it is not is an elegant, viable long term solution to a headless xbmc server.

as an aside: my point in mentioning my two kids was not to lessen your own situation or denigrate your experiences, but to point out that we had something in common. i'm not getting into one-upmanship contests online because it's a pointless waste of time, but while i appreciate being a single dad is tough, you're not the only one with difficult personal circumstances.

anyways, i'm done. i've said all that i think needed to be said, and hopefully it's been at least a little bit helpful.

Dude I couldn't even be bothered reading your whole laddi da, Considering you don't know shit! and you haven't even bothered making sense in regards too many off my statements, let alone the title off this thread.... HEY IF PEOPLE WANTED THIS OR THAT, then make a bloody thread about this or that.... Dont come on my thread that specifically said "MINIFIED" and getting a big head because your code knows best, then telling me what everyone else wants.... Look a few posts above you, and see the problems arisen just because off unneeded shit in the code/application.... Get ya head outta your ass! i've read vajonam's code and seen what he's done... Also robotica's method would be nothing like vajonam's patch ya fool....

"i don't think that's a fair criticism" and no its not... because you just can't accept being put in your place ey, or you just dont like too be wrong, Its a logical analogy. You could use anything in this world in conjunction, so stop boxing ya head in.

Ill tell you once and once only. DONT try and insult me again and my understanding off the application, or trying to use your father hood too relate (because you just have no idea!). The reason im like this now is because you have just gone on and on and on... WHEN I F***en said posts and posts ago that i'm ok with the lib direction, I just wanted too throw my opinion in the air, not a geek battle, nuff said!

And you know what pisses me off more, the fact that you turn around and say shit like "for the record, that's got even more of the xbmc application gubbins in there than the library solution because it's nothing more than a couple of inline code switches to disable elements of the gui based on a startup parameter" I ALREADY KNEW THAT.... YOU HAVE NOT READ OR ATLEAST UNDERSTOOD ANYTHING I WROTE ON THIS THREAD!!! And im not even gonna bother explaining anymore... No where did i say eden-server was the way too go, nor did i like it.... NO WHERE, NO WHERE AT ALL DID I SAY THAT!!!! I saw how dirty it was with conditional statements with scoping out gui related actions. SO I ALREADY KNEW THIS!

OH "the json interface, the http communications layer, and so on" rightio, so where are the other 250MB coming from? We all know. everything needed for the server, would be max 10MB period!!!!!


also do yourself a favour, and dont reply too this anymore. Otherwise your just asking for an endless, pointless battle.
Reply
What's the best way to disable sound, the log seems to fill up with errors
Quote:20:19:31 T:3015170880 INFO: CAESinkALSA::Initialize - Attempting to open device ""
20:19:31 T:3015170880 INFO: CAESinkALSA - ALSA: pcm.c:2217Sadsnd_pcm_open_noupdate) Unknown PCM
20:19:31 T:3015170880 INFO: CAESinkALSA - Unable to open device "" for playback
20:19:31 T:3015170880 ERROR: CAESinkALSA::Initialize - failed to initialize device ""
20:19:31 T:3015170880 ERROR: CAESinkOSS::Initialize - Failed to open the audio device: /dev/dsp
20:19:31 T:3015170880 DEBUG: CSoftAE::InternalOpenSink - NULL Initialized:
20:19:31 T:3015170880 DEBUG: Output Device : Device not found
20:19:31 T:3015170880 DEBUG: Sample Rate : 44100
20:19:31 T:3015170880 DEBUG: Sample Format : AE_FMT_FLOAT
20:19:31 T:3015170880 DEBUG: Channel Count : 2
20:19:31 T:3015170880 DEBUG: Channel Layout: FL,FR
20:19:31 T:3015170880 DEBUG: Frames : 22000
20:19:31 T:3015170880 DEBUG: Frame Samples : 2
20:19:31 T:3015170880 DEBUG: Frame Size : 8
20:19:31 T:3015170880 DEBUG: CSoftAE::InternalOpenSink - Using speaker layout: 2.0
20:19:31 T:3015170880 DEBUG: CSoftAE::InternalOpenSink - Internal Buffer Size: 176000
20:19:42 T:3015170880 DEBUG: CSoftAE::Run - Sink restart flagged
Reply
I only get the notice and debug errors for audio in the log during initial startup. My xbmc.log is currently 30M as it's been running now for several months this way. Scrolling up through it the only information in it is in regards to library updates, cleanups, etc.

Reply
(2012-11-03, 00:47)Bootlegninja Wrote: here's the full gdb output. Sorry. I thought I posted it before I left for a bit. My winblows system loves messing with me sometimes.

Code:
root@server:/opt/xbmc# gdb ./xbmcVideoLibraryScan
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/xbmc/xbmcVideoLibraryScan...done.
(gdb) r
Starting program: /opt/xbmc/xbmcVideoLibraryScan
[Thread debugging using libthread_db enabled]
Can't open display
[New Thread 0x7fffea480700 (LWP 23047)]
[New Thread 0x7fffe9844700 (LWP 23049)]
[New Thread 0x7ffff7e90700 (LWP 23050)]
[Thread 0x7ffff7e90700 (LWP 23050) exited]
XBMC Media Center 12.0-ALPHA7 Git:20121030-28ca9a4
Copyright (C) 2005-2011 Team XBMC - http://www.xbmc.org

Starting Video Library Scan

[New Thread 0x7fffe898c700 (LWP 23051)]
[New Thread 0x7fffe3fff700 (LWP 23052)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe898c700 (LWP 23051)]
0x00007ffff5fa5f64 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) bt
#0  0x00007ffff5fa5f64 in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0x00007ffff72d7387 in XbmcThreads::pthreads::RecursiveMutex::lock (
    this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/platform/pthreads/CriticalSection.h:49
#2  XbmcThreads::CountingLockable<XbmcThreads::pthreads::RecursiveMutex>::lock
    (this=0x0, strTitle=...) at /home/bootleg/xbmc/xbmc/threads/Lockables.h:59
#3  UniqueLock (this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/Lockables.h:116
#4  CSingleLock (this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/SingleLock.h:37
#5  CGUIDialogExtendedProgressBar::GetHandle (this=0x0, strTitle=...)
    at GUIDialogExtendedProgressBar.cpp:75
#6  0x00007ffff703a909 in VIDEO::CVideoInfoScanner::Process (this=0x612560)
    at VideoInfoScanner.cpp:89
#7  0x00007ffff7857c60 in CThread::Action (this=0x612560) at Thread.cpp:218
#8  0x00007ffff7858621 in CThread::staticThread (data=<value optimized out>)
    at Thread.cpp:128
#9  0x00007ffff5fa38ca in start_thread () from /lib/libpthread.so.0
#10 0x00007ffff6288b6d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()
(gdb)

Should be same error as here: http://forum.xbmc.org/showthread.php?tid...pid1228776 Smile
Reply
(2012-11-03, 00:47)Bootlegninja Wrote: here's the full gdb output. Sorry. I thought I posted it before I left for a bit. My winblows system loves messing with me sometimes.

Code:
root@server:/opt/xbmc# gdb ./xbmcVideoLibraryScan
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/xbmc/xbmcVideoLibraryScan...done.
(gdb) r
Starting program: /opt/xbmc/xbmcVideoLibraryScan
[Thread debugging using libthread_db enabled]
Can't open display
[New Thread 0x7fffea480700 (LWP 23047)]
[New Thread 0x7fffe9844700 (LWP 23049)]
[New Thread 0x7ffff7e90700 (LWP 23050)]
[Thread 0x7ffff7e90700 (LWP 23050) exited]
XBMC Media Center 12.0-ALPHA7 Git:20121030-28ca9a4
Copyright (C) 2005-2011 Team XBMC - http://www.xbmc.org

Starting Video Library Scan

[New Thread 0x7fffe898c700 (LWP 23051)]
[New Thread 0x7fffe3fff700 (LWP 23052)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe898c700 (LWP 23051)]
0x00007ffff5fa5f64 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) bt
#0  0x00007ffff5fa5f64 in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0x00007ffff72d7387 in XbmcThreads::pthreads::RecursiveMutex::lock (
    this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/platform/pthreads/CriticalSection.h:49
#2  XbmcThreads::CountingLockable<XbmcThreads::pthreads::RecursiveMutex>::lock
    (this=0x0, strTitle=...) at /home/bootleg/xbmc/xbmc/threads/Lockables.h:59
#3  UniqueLock (this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/Lockables.h:116
#4  CSingleLock (this=0x0, strTitle=...)
    at /home/bootleg/xbmc/xbmc/threads/SingleLock.h:37
#5  CGUIDialogExtendedProgressBar::GetHandle (this=0x0, strTitle=...)
    at GUIDialogExtendedProgressBar.cpp:75
#6  0x00007ffff703a909 in VIDEO::CVideoInfoScanner::Process (this=0x612560)
    at VideoInfoScanner.cpp:89
#7  0x00007ffff7857c60 in CThread::Action (this=0x612560) at Thread.cpp:218
#8  0x00007ffff7858621 in CThread::staticThread (data=<value optimized out>)
    at Thread.cpp:128
#9  0x00007ffff5fa38ca in start_thread () from /lib/libpthread.so.0
#10 0x00007ffff6288b6d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()
(gdb)

Have you tried the re-worked sample from post #164?
Reply
  • 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 58

Logout Mark Read Team Forum Stats Members Help
xbmc minified as a server?9
This forum uses Lukasz Tkacz MyBB addons.