[vlc-devel] commit: Dummy: remove dummy (indeed) access, convert demux to access_demux ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Aug 1 16:07:07 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 1 17:05:53 2009 +0300| [e4f5a0fe36d5e5ac7d910385d023fa7ca8ca0706] | committer: Rémi Denis-Courmont
Dummy: remove dummy (indeed) access, convert demux to access_demux
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4f5a0fe36d5e5ac7d910385d023fa7ca8ca0706
---
modules/misc/dummy/dummy.c | 7 +---
modules/misc/dummy/dummy.h | 2 -
modules/misc/dummy/input.c | 80 +------------------------------------------
3 files changed, 3 insertions(+), 86 deletions(-)
diff --git a/modules/misc/dummy/dummy.c b/modules/misc/dummy/dummy.c
index 547c84b..9fd1940 100644
--- a/modules/misc/dummy/dummy.c
+++ b/modules/misc/dummy/dummy.c
@@ -68,13 +68,8 @@ vlc_module_begin ()
add_bool( "dummy-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, false )
#endif
add_submodule ()
- set_description( N_("Dummy access function") )
- set_capability( "access", 0 )
- set_callbacks( OpenAccess, NULL )
- add_shortcut( "vlc" )
- add_submodule ()
set_description( N_("Dummy demux function") )
- set_capability( "demux", 0 )
+ set_capability( "access_demux", 0 )
set_callbacks( OpenDemux, CloseDemux )
add_shortcut( "vlc" )
add_submodule ()
diff --git a/modules/misc/dummy/dummy.h b/modules/misc/dummy/dummy.h
index 09f8972..5e792a4 100644
--- a/modules/misc/dummy/dummy.h
+++ b/modules/misc/dummy/dummy.h
@@ -26,8 +26,6 @@
*****************************************************************************/
int OpenIntf ( vlc_object_t * );
-int OpenAccess ( vlc_object_t * );
-
int OpenDemux ( vlc_object_t * );
void CloseDemux ( vlc_object_t * );
diff --git a/modules/misc/dummy/input.c b/modules/misc/dummy/input.c
index 0bdf602..b7cedf3 100644
--- a/modules/misc/dummy/input.c
+++ b/modules/misc/dummy/input.c
@@ -31,86 +31,11 @@
#include <vlc_common.h>
#include <vlc_interface.h>
-#include <vlc_access.h>
#include <vlc_demux.h>
#include <vlc_charset.h>
#include "dummy.h"
-/*****************************************************************************
- * Access functions.
- *****************************************************************************/
-static ssize_t AccessRead( access_t *p_access, uint8_t *p, size_t i_size )
-{
- VLC_UNUSED(p_access);
- memset( p, 0, i_size );
- return i_size;
-}
-static int AccessControl( access_t *p_access, int i_query, va_list args )
-{
- bool *pb_bool;
- int64_t *pi_64;
-
- switch( i_query )
- {
- /* */
- case ACCESS_CAN_SEEK:
- case ACCESS_CAN_FASTSEEK:
- case ACCESS_CAN_PAUSE:
- case ACCESS_CAN_CONTROL_PACE:
- pb_bool = (bool*)va_arg( args, bool* );
- *pb_bool = false;
- break;
-
- /* */
- case ACCESS_GET_PTS_DELAY:
- pi_64 = (int64_t*)va_arg( args, int64_t * );
- *pi_64 = DEFAULT_PTS_DELAY * 1000;
- break;
-
- /* */
- case ACCESS_SET_PAUSE_STATE:
- case ACCESS_GET_TITLE_INFO:
- case ACCESS_GET_META:
- case ACCESS_SET_TITLE:
- case ACCESS_SET_SEEKPOINT:
- return VLC_EGENERIC;
-
- default:
- msg_Err( p_access, "unimplemented query in control" );
- return VLC_EGENERIC;
- }
- return VLC_SUCCESS;
-}
-
-int OpenAccess( vlc_object_t *p_this )
-{
- access_t *p_access = (access_t*)p_this;
-
- /* Init p_access */
- p_access->pf_read = AccessRead;
- p_access->pf_block = NULL;
- p_access->pf_seek = NULL;
- p_access->pf_control = AccessControl;
- p_access->info.i_update = 0;
- p_access->info.i_size = 0;
- p_access->info.i_pos = 0;
- p_access->info.b_eof = false;
- p_access->info.i_title = 0;
- p_access->info.i_seekpoint = 0;
- p_access->p_sys = NULL;
-
- /* Force dummy demux plug-in */
- free( p_access->psz_demux );
- p_access->psz_demux = strdup( "vlc" );
-
- return VLC_SUCCESS;
-}
-
-
-/*****************************************************************************
- * Demux
- *****************************************************************************/
static int DemuxControl( demux_t *, int, va_list );
static int DemuxNoOp( demux_t *demux )
@@ -191,7 +116,6 @@ void CloseDemux ( vlc_object_t *p_this )
static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
{
- return demux_vaControlHelper( p_demux->s,
- 0, 0, 0, 1,
- i_query, args );
+ (void)p_demux; (void)i_query; (void)args;
+ return VLC_EGENERIC;
}
More information about the vlc-devel
mailing list