[Redbutton-devel] SF.net SVN: redbutton: [203]
Brought to you by:
skilvington
From: <ski...@us...> - 2007-01-29 16:55:41
|
Revision: 203 http://svn.sourceforge.net/redbutton/?rev=203&view=rev Author: skilvington Date: 2007-01-29 08:55:28 -0800 (Mon, 29 Jan 2007) Log Message: ----------- default backend is "-r 127.0.0.1" Modified Paths: -------------- redbutton-browser/trunk/MHEGBackend.h redbutton-browser/trunk/rb-browser.c www/index.html Modified: redbutton-browser/trunk/MHEGBackend.h =================================================================== --- redbutton-browser/trunk/MHEGBackend.h 2007-01-28 09:52:02 UTC (rev 202) +++ redbutton-browser/trunk/MHEGBackend.h 2007-01-29 16:55:28 UTC (rev 203) @@ -12,6 +12,8 @@ /* default TCP port to contact backend on */ #define DEFAULT_REMOTE_PORT 10101 +#define DEFAULT_BACKEND "127.0.0.1" + typedef struct MHEGBackend { char *base_dir; /* local Service Gateway root directory */ Modified: redbutton-browser/trunk/rb-browser.c =================================================================== --- redbutton-browser/trunk/rb-browser.c 2007-01-28 09:52:02 UTC (rev 202) +++ redbutton-browser/trunk/rb-browser.c 2007-01-29 16:55:28 UTC (rev 203) @@ -1,5 +1,5 @@ /* - * rb-browser [-v] [-f] [-d] [-o <video_output_method>] [-k <keymap_file>] [-t <timeout>] [-r] <service_gateway> + * rb-browser [-v] [-f] [-d] [-o <video_output_method>] [-k <keymap_file>] [-t <timeout>] [-r] [<service_gateway>] * * -v is verbose/debug mode * -f is full screen, otherwise it uses a window @@ -12,6 +12,8 @@ * -r means use a remote backend (rb-download running on another host), <service_gateway> should be host[:port] * if -r is not specified, rb-download is running on the same machine * and <service_gateway> should be an entry in the services directory, eg. services/4165 + * (this is really only for debugging or running MHEG apps you've written yourself) + * the default backend is "-r 127.0.0.1" */ #include <unistd.h> @@ -45,8 +47,8 @@ /* default options */ bzero(&opts, sizeof(MHEGEngineOptions)); - opts.remote = false; - opts.srg_loc = NULL; /* must be given on cmd line */ + opts.remote = false; /* not the default, but needed so you do eg "-r services/4165" */ + opts.srg_loc = DEFAULT_BACKEND; opts.verbose = 0; opts.fullscreen = false; opts.vo_method = NULL; @@ -92,11 +94,13 @@ } } - if(optind != argc - 1) + if(optind == argc) + opts.remote = true; /* default backend "-r 127.0.0.1" */ + else if(optind == argc - 1) + opts.srg_loc = argv[optind]; + else usage(prog_name); - opts.srg_loc = argv[optind]; - /* chop off any trailing / chars for local directory name */ if(!opts.remote) { @@ -125,7 +129,7 @@ "[-k <keymap_file>] " "[-t <timeout>] " "[-r] " - "<service_gateway>\n\n" + "[<service_gateway>]\n\n" "%s", prog_name, MHEGVideoOutputMethod_getUsage()); } Modified: www/index.html =================================================================== --- www/index.html 2007-01-28 09:52:02 UTC (rev 202) +++ www/index.html 2007-01-29 16:55:28 UTC (rev 203) @@ -50,6 +50,10 @@ <P> rb-download needs a "channels.conf" file which gives tuning parameters for service_id's. A channels.conf files can be generated by the "scan" utility in the dvb-apps package at <A HREF="http://www.linuxtv.org">www.linuxtv.org</A>. +For example: +<PRE> +scan ./uk-Malvern > ~/.tzap/channels.conf +</PRE> If not specified with -f, rb-download will search for: <UL> <LI>~/.tzap/channels.conf</LI> @@ -69,6 +73,10 @@ <P> If no <service_id> is given, a list of possible channels (and their <service_id>) is printed. These will be the channels available on the MUX your DVB card is currently tuned to. Use dvbtune or equivalent to tune your card. +eg: +<PRE> +dvbtune -f 722166667 && rb-download +</PRE> <P> The file structure stored under <base_dir> will be: <PRE> @@ -95,23 +103,25 @@ <H2>rb-browser</H2> Usage: <PRE> -rb-browser [-v] [-f] [-d] [-o <video_output_method>] [-k <keymap_config_file>] [-t <timeout>] [-r] <service_gateway> +rb-browser [-v] [-f] [-d] [-o <video_output_method>] [-k <keymap_config_file>] [-t <timeout>] [-r] [<service_gateway>] </PRE> Display the MHEG apps downloaded with rb-download. <P> The -r option means use a remote backend (rb-download running on another host). If -r is specified, then <service_gateway> should be the host[:port] that rb-download is running on. +<P> +The default backend is "-r 127.0.0.1" ie rb-download running on the same machine as rb-browser. +<P> If -r is not specified, rb-download is running on the same machine and <service_gateway> should be an entry in the services directory. +This is really only useful for debugging, or running MHEG apps you have written +yourself. +<P> Eg, on a single host, do this: <PRE> rb-download 4165 & -rb-browser services/4165 +rb-browser </PRE> -or, you could run rb-browser like this: -<PRE> -rb-browser -r 127.0.0.1 -</PRE> To run the frontend on a different host, do this on the backend: <PRE> rb-download 4165 & @@ -122,6 +132,13 @@ </PRE> where 10.0.0.1 is the IP or hostname of the backend. <P> +To run an MHEG app you have previously downloaded and saved, do this: +<PRE> +rb-browser path/to/saved/services/4165 +</PRE> +Although this will not give you any video or audio as this is streamed from rb-download. +Retuning will also probably not work unless you've also saved the services directory for the channel you want to retune to. +<P> It will display the app in a window, use -f for full screen mode. <P> The -d flag disables all audio and video output. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |