[vlc-devel] [RFC] vlm: make vod input objects children of vod server

Pierre Ynard linkfanel at yahoo.fr
Thu Jan 28 19:53:09 CET 2010


Currently, input objects of VoD media instances are children of the
libvlc object; this patch makes them children of the VoD server object
instead. My plan is to merge the VoD module into the RTP stream output,
and this change would make communications simpler and cleaner.


diff --git a/src/input/vlm.c b/src/input/vlm.c
index 331f20d..6aac925 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -566,7 +566,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
             if( asprintf( &psz_header, _("Media: %s"), p_cfg->psz_name ) == -1 )
                 psz_header = NULL;
 
-            p_input = input_Create( p_vlm->p_libvlc, p_media->vod.p_item, psz_header, NULL );
+            p_input = input_Create( p_vlm->p_vod, p_media->vod.p_item, psz_header, NULL );
             if( p_input )
             {
                 vlc_sem_t sem_preparse;
@@ -934,7 +934,8 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
 
     if( asprintf( &psz_log, _("Media: %s"), p_media->cfg.psz_name ) != -1 )
     {
-        p_instance->p_input = input_Create( p_vlm->p_libvlc, p_instance->p_item,
+        vlc_object_t *p_parent = p_media->cfg.b_vod ? VLC_OBJECT(p_vlm->p_vod) : VLC_OBJECT(p_vlm->p_libvlc);
+        p_instance->p_input = input_Create( p_parent, p_instance->p_item,
                                             psz_log, p_instance->p_input_resource );
         if( p_instance->p_input )
         {


Regards,

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."



More information about the vlc-devel mailing list