[vlc-devel] commit: Added INPUT_REPLACE_INFOS and INPUT_MERGE_INFOS. (Laurent Aimar )

git version control git at videolan.org
Fri Feb 5 23:36:21 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Feb  5 22:50:52 2010 +0100| [68fe87d7205b3b4ce98815b73863f462b069d1f9] | committer: Laurent Aimar 

Added INPUT_REPLACE_INFOS and INPUT_MERGE_INFOS.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68fe87d7205b3b4ce98815b73863f462b069d1f9
---

 include/vlc_input.h |    2 ++
 src/input/control.c |   14 ++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 6a357cd..7f7c72f 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -473,6 +473,8 @@ enum input_query_e
 
     /* Meta datas */
     INPUT_ADD_INFO,   /* arg1= char* arg2= char* arg3=...     res=can fail */
+    INPUT_REPLACE_INFOS,/* arg1= info_category_t *            res=cannot fail */
+    INPUT_MERGE_INFOS,/* arg1= info_category_t *              res=cannot fail */
     INPUT_GET_INFO,   /* arg1= char* arg2= char* arg3= char** res=can fail */
     INPUT_DEL_INFO,   /* arg1= char* arg2= char*              res=can fail */
     INPUT_SET_NAME,   /* arg1= char* res=can fail    */
diff --git a/src/input/control.c b/src/input/control.c
index 85ffb65..b2cf6b4 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -155,6 +155,20 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
                 input_SendEventMetaInfo( p_input );
             return i_ret;
         }
+        case INPUT_REPLACE_INFOS:
+        case INPUT_MERGE_INFOS:
+        {
+            info_category_t *p_cat = va_arg( args, info_category_t * );
+
+            if( i_query == INPUT_REPLACE_INFOS )
+                input_item_ReplaceInfos( p_input->p->p_item, p_cat );
+            else
+                input_item_MergeInfos( p_input->p->p_item, p_cat );
+
+            if( !p_input->b_preparsing )
+                input_SendEventMetaInfo( p_input );
+            return VLC_SUCCESS;
+        }
         case INPUT_DEL_INFO:
         {
             char *psz_cat = (char *)va_arg( args, char * );




More information about the vlc-devel mailing list