[Redbutton-devel] SF.net SVN: redbutton: [186]
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-01-22 15:23:27
|
Revision: 186
http://svn.sourceforge.net/redbutton/?rev=186&view=rev
Author: skilvington
Date: 2007-01-22 07:23:21 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
add -d flag to disable all audio and video output
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
redbutton-browser/trunk/MHEGEngine.h
redbutton-browser/trunk/MHEGStreamPlayer.c
redbutton-browser/trunk/rb-browser.c
www/index.html
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/MHEGEngine.c 2007-01-22 15:23:21 UTC (rev 186)
@@ -174,6 +174,7 @@
MHEGDisplay_init(&engine.display, opts->fullscreen, opts->keymap);
engine.vo_method = MHEGVideoOutputMethod_fromString(opts->vo_method);
+ engine.av_disabled = opts->av_disabled;
MHEGBackend_init(&engine.backend, opts->remote, opts->srg_loc);
@@ -261,7 +262,7 @@
boot_obj.size = engine.quit_data.size;
boot_obj.data = engine.quit_data.data;
break;
-
+
case QuitReason_Spawn:
verbose("Spawn '%.*s'", engine.quit_data.size, engine.quit_data.data);
/* TODO */
@@ -270,12 +271,12 @@
boot_obj.size = engine.quit_data.size;
boot_obj.data = engine.quit_data.data;
break;
-
+
case QuitReason_Retune:
verbose("Retune to '%.*s'", engine.quit_data.size, engine.quit_data.data);
MHEGEngine_retune(&engine.quit_data);
break;
-
+
default:
/* nothing to do */
break;
@@ -316,6 +317,12 @@
return engine.vo_method;
}
+bool
+MHEGEngine_avDisabled(void)
+{
+ return engine.av_disabled;
+}
+
/*
* according to the ISO MHEG spec this should be part of the SceneClass
* but we need info about the current app etc too
Modified: redbutton-browser/trunk/MHEGEngine.h
===================================================================
--- redbutton-browser/trunk/MHEGEngine.h 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/MHEGEngine.h 2007-01-22 15:23:21 UTC (rev 186)
@@ -86,6 +86,7 @@
unsigned int timeout; /* seconds to poll for missing content before generating a ContentRefError */
bool fullscreen; /* scale to fullscreen? */
char *vo_method; /* MHEGVideoOutputMethod name (NULL for default) */
+ bool av_disabled; /* true => audio and video output totally disabled */
char *keymap; /* keymap config file to use (NULL for default) */
} MHEGEngineOptions;
@@ -168,6 +169,7 @@
unsigned int timeout; /* how long to poll for missing content before generating an error */
MHEGDisplay display; /* make porting easier */
MHEGVideoOutputMethod *vo_method; /* video output method (resolved from name given in MHEGEngineOptions) */
+ bool av_disabled; /* true => video and audio output totally disabled */
MHEGBackend backend; /* local or remote access to DSMCC carousel and MPEG streams */
MHEGApp active_app; /* application we are currently running */
QuitReason quit_reason; /* do we need to stop the current app */
@@ -189,6 +191,7 @@
MHEGDisplay *MHEGEngine_getDisplay(void);
MHEGVideoOutputMethod *MHEGEngine_getVideoOutputMethod(void);
+bool MHEGEngine_avDisabled(void);
void MHEGEngine_TransitionTo(TransitionTo *, OctetString *);
Modified: redbutton-browser/trunk/MHEGStreamPlayer.c
===================================================================
--- redbutton-browser/trunk/MHEGStreamPlayer.c 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/MHEGStreamPlayer.c 2007-01-22 15:23:21 UTC (rev 186)
@@ -168,6 +168,10 @@
if(p->video != NULL)
p->video->inst.no_video = true;
+ /* is audio/video output totally disabled */
+ if(MHEGEngine_avDisabled())
+ return;
+
p->audio_pid = p->audio_tag;
p->video_pid = p->video_tag;
if((p->ts = MHEGEngine_openStream(p->have_audio, &p->audio_pid, &p->audio_type,
Modified: redbutton-browser/trunk/rb-browser.c
===================================================================
--- redbutton-browser/trunk/rb-browser.c 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/rb-browser.c 2007-01-22 15:23:21 UTC (rev 186)
@@ -1,8 +1,9 @@
/*
- * rb-browser [-v] [-f] [-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
+ * -d disables all video and audio output
* -o allows you to choose a video output method if the default is not supported/too slow on your graphics card
* (do 'rb-browser -o' for a list of available methods)
* -k changes the default key map to the given file
@@ -49,10 +50,11 @@
opts.verbose = 0;
opts.fullscreen = false;
opts.vo_method = NULL;
+ opts.av_disabled = false;
opts.timeout = MISSING_CONTENT_TIMEOUT;
opts.keymap = NULL;
- while((arg = getopt(argc, argv, "rvfo:k:t:")) != EOF)
+ while((arg = getopt(argc, argv, "rvfdo:k:t:")) != EOF)
{
switch(arg)
{
@@ -68,6 +70,10 @@
opts.fullscreen = true;
break;
+ case 'd':
+ opts.av_disabled = true;
+ break;
+
case 'o':
opts.vo_method = optarg;
break;
@@ -114,6 +120,7 @@
fatal("Usage: %s "
"[-v] "
"[-f] "
+ "[-d] "
"[-o <video_output_method>] "
"[-k <keymap_file>] "
"[-t <timeout>] "
Modified: www/index.html
===================================================================
--- www/index.html 2007-01-22 10:31:43 UTC (rev 185)
+++ www/index.html 2007-01-22 15:23:21 UTC (rev 186)
@@ -95,7 +95,7 @@
<H2>rb-browser</H2>
Usage:
<PRE>
-rb-browser [-v] [-f] [-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>
@@ -124,6 +124,11 @@
<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.
+<P>
+Use -o to choose a video output method if the default is not supported/too slow on your graphics card.
+'rb-browser -o' will give a list of available video output methods.
+<P>
The -v flag enables verbose/debug mode.
<P>
The -t flag determines how long (in seconds) it will poll for missing files before passing an error to the MHEG application.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|