maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [M4+5] oscp - multiplatform player for (almost) any file format and network streams (using libav/ffmpeg and others), now with pygtk GUI (https://talk.maemo.org/showthread.php?t=94590)

KotCzarny 2015-02-11 05:04

Re: oscp - console player for (almost) any file format
 
just add -DBUILD=sulu -DVERSION=sulu to gcc line. its only informational to know which iteration it is

sulu 2015-02-11 07:03

Re: oscp - console player for (almost) any file format
 
1 Attachment(s)
That doesn't help because BUILD and MD5 would still be undefined and it doesn't fix the overflow:
Code:

$ gcc -DBUILD=sulu -DVERSION=sulu oscp.c
oscp.c:21:0: warning: "VERSION" redefined
 #define VERSION "0.9.6"
 ^
<command-line>:0:0: note: this is the location of the previous definition
oscp.c: In function ‘show_help’:
<command-line>:0:7: error: ‘sulu’ undeclared (first use in this function)
oscp.c:112:13: note: in expansion of macro ‘BUILD’
 ", VERSION, BUILD, MD5, confname, progname);
            ^
<command-line>:0:7: note: each undeclared identifier is reported only once for each function it appears in
oscp.c:112:13: note: in expansion of macro ‘BUILD’
 ", VERSION, BUILD, MD5, confname, progname);
            ^
oscp.c:112:20: error: ‘MD5’ undeclared (first use in this function)
 ", VERSION, BUILD, MD5, confname, progname);
                    ^
oscp.c: In function ‘get_ch’:
oscp.c:1634:14: warning: overflow in implicit constant conversion [-Woverflow]
  } else ch = (chtype) ERR;
              ^

I also tried to define BUILD and MD5 in the code:
Code:

#define BUILD "sulu"
#define MD5 "1"

But then I get lots of undefined references (see attached archive).

KotCzarny 2015-02-11 07:19

Re: oscp - console player for (almost) any file format
 
you have to compile each .c file into .o then link them with static or compiled libs:
gcc file.c -o file.o
gcc file2.c -o file2.o
gcc file.o file2.o -o final-binary -lncurses -lm -lz -lsomeotherlib
..etc

sulu 2015-02-11 08:10

Re: oscp - console player for (almost) any file format
 
Thanks, I'll try that.
10 years ago I was a C programmer, but it wasn't plain ANSI C but a custom toolkit that took care of all the compiling and linking stuff.
So I'm pretty much lost nowadays if I have no Makefile.

KotCzarny 2015-02-11 14:38

Re: oscp - console player for (almost) any file format
 
i've updated first post with recent builds for n8x0/n900 (finally one binary that works on both platforms) and added one for x86 (linux)

KotCzarny 2015-02-12 07:36

Re: oscp - console player for (almost) any file format
 
another update, this time i've added configurable keys. run program at least once, then check ~/.oscp.conf
also, moved downloads to the sourceforge. let me know if you have any issues/suggestions

ps. if you run latest build allow it reinit properly by removing config files (do: rm ~/.libao ~/.oscp.conf )

KotCzarny 2015-02-12 22:07

Re: oscp - console player for (almost) any file format
 
another update. remote interface is in. to enable: set in ~/.oscp.conf or run with -L port
word of caution: no password needed to connect (for now). for available commands see: http://sourceforge.net/projects/oscp...e.txt/download
so now you can run oscp on n8x0/n900 and connect via tcp/ip (fe. telnet) and send commands to it. or you can run it on linux machine and write pygtk interface and control it from your n8x0/n900

anyone needs anything else?

KotCzarny 2015-02-13 19:52

Re: oscp - console player for (almost) any file format
 
just uploaded new version along with oscp-remote.py (link in first post). right now i've tested it by running player on n800 and remote on x86-linux. and it works, woo! more testing after i have some food

KotCzarny 2015-02-14 15:13

Re: oscp - console player for (almost) any file format
 
added oscp-n900-PA binary, this one uses native pulseaudio which seems to work on my stock n900 (fremantle). volume control is disabled because it was blocking PA. also, weirdly cpu usage is 2x of n800 compiled version. but it produces sound now so at least i can work on it

KotCzarny 2015-02-14 17:45

Re: oscp - console player for (almost) any file format
 
updated remote.py and added some screenshots to first post


All times are GMT. The time now is 10:48.

vBulletin® Version 3.8.8