xbmc minified as a server?

  Thread Rating:
  • 5 Votes - 3.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Odon Offline
Member
Posts: 68
Joined: Apr 2010
Reputation: 0
Post: #11
(2012-06-13 10:48)vicbitter Wrote:  With the latest code from head you now create a libxbmc.so shared library that can be used to create your own CLI (or server-based) XBMC applications... Smile

Here is a sample Video Library scanner application that uses libxbmc.so to update XBMCs Video Library...

http://pastebin.com/WpEvRTws

Enjoy!

Thank you for the sample, i will try to do some improvements to have a complete Headless XBMC Server : ) (webserver, json, periodical updates)
find quote
jompan87 Offline
Member+
Posts: 113
Joined: Oct 2008
Reputation: 0
Post: #12
(2012-06-15 17:04)Odon Wrote:  
(2012-06-13 10:48)vicbitter Wrote:  With the latest code from head you now create a libxbmc.so shared library that can be used to create your own CLI (or server-based) XBMC applications... Smile

Here is a sample Video Library scanner application that uses libxbmc.so to update XBMCs Video Library...

http://pastebin.com/WpEvRTws

Enjoy!

Thank you for the sample, i will try to do some improvements to have a complete Headless XBMC Server : ) (webserver, json, periodical updates)


Thats great news! If you need a WHS2011 tester im right here!! Smile
find quote
Odon Offline
Member
Posts: 68
Joined: Apr 2010
Reputation: 0
Post: #13
(2012-06-16 12:56)jompan87 Wrote:  
(2012-06-15 17:04)Odon Wrote:  
(2012-06-13 10:48)vicbitter Wrote:  With the latest code from head you now create a libxbmc.so shared library that can be used to create your own CLI (or server-based) XBMC applications... Smile

Here is a sample Video Library scanner application that uses libxbmc.so to update XBMCs Video Library...

http://pastebin.com/WpEvRTws

Enjoy!

Thank you for the sample, i will try to do some improvements to have a complete Headless XBMC Server : ) (webserver, json, periodical updates)


Thats great news! If you need a WHS2011 tester im right here!! Smile

I don't know if libxbmc is buildable on Windows yet.
find quote
vicbitter Offline
Member+
Posts: 240
Joined: Jan 2011
Reputation: 3
Post: #14
(2012-06-15 17:04)Odon Wrote:  
(2012-06-13 10:48)vicbitter Wrote:  With the latest code from head you now create a libxbmc.so shared library that can be used to create your own CLI (or server-based) XBMC applications... Smile

Here is a sample Video Library scanner application that uses libxbmc.so to update XBMCs Video Library...

http://pastebin.com/WpEvRTws

Enjoy!

Thank you for the sample, i will try to do some improvements to have a complete Headless XBMC Server : ) (webserver, json, periodical updates)

You'll find that to get the webserver, json, etc running you won't have do much at all... In fact, all you need to do is, remove line 95 and the "g_application.IsVideoScanning()" check from the while loop...

After that you can launch it as a background process and control it with http, json, etc

For example, having it run in the background, you would issue the following HTTP commands to do a video library update...

To get XBMC to update the video library:
Code:
curl --user xbmc_web_user:xbmc_web_password "http://xbmc_ip_address:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(XBMC.UpdateLibrary(video))"

To get XBMC to exit:
Code:
curl --user xbmc_web_user:xbmc_web_password "http://xbmc_ip_address:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(XBMC.Quit)"

Note: You need to enable HTTP access in XBMC and xbmc_web_user, xbmc_web_password, xbmc_ip_address will be specific to your setup
(This post was last modified: 2012-06-16 19:40 by vicbitter.)
find quote
excyle Offline
Junior Member
Posts: 10
Joined: Oct 2009
Reputation: 0
Location: Hoogezand, The Netherlands
Post: #15
I'm trying to compile the cpp but keep getting stuck.
Code:
git clone git://github.com/xbmc/xbmc.git
cd xbmc
wget http://pastebin.com/download.php?i=WpEvRTws -O xbmcvideolibraryscan.cpp
g++ xbmcvideolibraryscan.cpp -Ixbmc/ -Ilib/ -o xbmcvideolibraryscan
should normally do the trick right ?

I'm getting a lot of this kind of errors
Code:
ISO C++ forbids declaration of âsomethingâ with no type

It also seems to compile the windows version somehow because i see Iphlpapi.h being included from NetworkWin32.h
(This post was last modified: 2012-06-25 20:39 by excyle.)
find quote
pumkinut Offline
Posting Freak
Posts: 875
Joined: May 2006
Reputation: 9
Post: #16
I'm in the middle of moving my Ubuntu file server off of an ancient P4 Dell onto a min-ITX C2D setup. I'll be following this thread to see what progress is made. Sounds like this would be just right for a centralized setup with multiple clients.
find quote
Basje Offline
Skilled Python Coder
Posts: 984
Joined: Jul 2005
Reputation: 4
Post: #17
(2012-06-25 20:38)excyle Wrote:  I'm trying to compile the cpp but keep getting stuck.
Code:
git clone git://github.com/xbmc/xbmc.git
cd xbmc
wget http://pastebin.com/download.php?i=WpEvRTws -O xbmcvideolibraryscan.cpp
g++ xbmcvideolibraryscan.cpp -Ixbmc/ -Ilib/ -o xbmcvideolibraryscan
should normally do the trick right ?

I'm getting a lot of this kind of errors
Code:
ISO C++ forbids declaration of âsomethingâ with no type

It also seems to compile the windows version somehow because i see Iphlpapi.h being included from NetworkWin32.h

Can somebody confirm a working version of this for Windows?

find quote
manxam Offline
Senior Member
Posts: 155
Joined: Jan 2005
Reputation: 3
Post: #18
I'm curious on how to compile this as well. I'm getting stuck at Iphlpapi.h missing which is being called from NetworkWin32.h. This is being compiled against head on ubuntu.

Cheers
find quote
vicbitter Offline
Member+
Posts: 240
Joined: Jan 2011
Reputation: 3
Post: #19
The shared library won't work on Windows... Sorry...

To compile the example...

a) Setup your build environment and compile libxbmc.so. ie.
Code:
./bootstrap && ./configure --enable-shared-lib && make

b) Compile xbmcVideoLibraryScan.cpp - This step is a bit of a kludge but it works...
Code:
i) Copy xbmcVideoLibraryScan.cpp to the top level directory of the xbmc code...
ii) Edit xbmc/Makefile and add SRCS+=..\xbmcVideoLibraryScan.cpp at the bottom
ii) Run make
iii) Edit xbmc/Makefile and remove SRCS line from ii) above
iv) Delete libxbmc.so & xbmc.a and run make again

c) Create the binary. ie.
Code:
gcc -o xbmcVideoLibraryScan xbmcVideoLibraryScan.o -lxbmc -lstdc++
(This post was last modified: 2012-07-08 00:06 by vicbitter.)
find quote
Basje Offline
Skilled Python Coder
Posts: 984
Joined: Jul 2005
Reputation: 4
Post: #20
(2012-07-07 12:53)vicbitter Wrote:  The shared library won't work on Windows... Sorry...
Will it eventually work on Windows? Or will it be Linux only?

find quote
Post Reply