[vlc-commits] input: remove triggering of legacy events

Romain Vimont git at videolan.org
Mon Aug 20 13:59:20 CEST 2018


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Thu Aug 16 10:22:23 2018 +0200| [1bd673016f55f6c272312e278f15494044992bfc] | committer: Romain Vimont

input: remove triggering of legacy events

Now that the code has been adapted to receive "subtree added" and
"preparse ended" events from the input thread and preparser callbacks,
do not trigger the events on the input item anymore.

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

 src/input/es_out.c        |  4 +---
 src/preparser/preparser.c | 12 ------------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 8695dfb95e..a636c7fdbf 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2916,9 +2916,7 @@ static int EsOutVaControlLocked( es_out_t *out, int i_query, va_list args )
         input_thread_t *input = p_sys->p_input;
         input_item_node_t *node = va_arg(args, input_item_node_t *);
         input_SendEventParsing(input, node);
-
-        /* TODO remove "PostAnd" once InputItemSubItemTreeAdded is not needed */
-        input_item_node_PostAndDelete(node);
+        input_item_node_Delete(node);
 
         return VLC_SUCCESS;
     }
diff --git a/src/preparser/preparser.c b/src/preparser/preparser.c
index 37f954a99f..9e1e5c1b20 100644
--- a/src/preparser/preparser.c
+++ b/src/preparser/preparser.c
@@ -150,8 +150,6 @@ static int PreparserOpenInput( void* preparser_, void* req_, void** out )
 
 error:
     free( task );
-    /* TODO remove legacy input_item_SignalPreparseEnded() */
-    input_item_SignalPreparseEnded(req->item, ITEM_PREPARSE_FAILED);
     if (req->cbs && req->cbs->on_preparse_ended)
         req->cbs->on_preparse_ended(req->item, ITEM_PREPARSE_FAILED, req->userdata);
     return VLC_EGENERIC;
@@ -172,8 +170,6 @@ static void on_art_fetch_ended(input_item_t *item, bool fetched, void *userdata)
     input_preparser_req_t *req = task->req;
 
     input_item_SetPreparsed(req->item, true);
-    /* TODO remove legacy input_item_SignalPreparseEnded() */
-    input_item_SignalPreparseEnded(req->item, task->preparse_status);
 
     if (req->cbs && req->cbs->on_preparse_ended)
         req->cbs->on_preparse_ended(req->item, task->preparse_status, req->userdata);
@@ -225,8 +221,6 @@ static void PreparserCloseInput( void* preparser_, void* task_ )
     free(task);
 
     input_item_SetPreparsed( item, true );
-    /* TODO remove legacy input_item_SignalPreparseEnded() */
-    input_item_SignalPreparseEnded( item, status );
     if (req->cbs && req->cbs->on_preparse_ended)
         req->cbs->on_preparse_ended(req->item, status, req->userdata);
 }
@@ -291,8 +285,6 @@ void input_preparser_Push( input_preparser_t *preparser,
                 break;
             /* fallthrough */
         default:
-            /* TODO remove legacy input_item_SignalPreparseEnded() */
-            input_item_SignalPreparseEnded( item, ITEM_PREPARSE_SKIPPED );
             if (cbs && cbs->on_preparse_ended)
                 cbs->on_preparse_ended(item, ITEM_PREPARSE_SKIPPED, cbs_userdata);
             return;
@@ -301,12 +293,8 @@ void input_preparser_Push( input_preparser_t *preparser,
     struct input_preparser_req_t *req = ReqCreate(item, cbs, cbs_userdata);
 
     if (background_worker_Push(preparser->worker, req, id, timeout))
-    {
-        /* TODO remove legacy input_item_SignalPreparseEnded() */
-        input_item_SignalPreparseEnded( item, ITEM_PREPARSE_FAILED );
         if (req->cbs && cbs->on_preparse_ended)
             cbs->on_preparse_ended(item, ITEM_PREPARSE_FAILED, cbs_userdata);
-    }
 
     ReqRelease(req);
 }



More information about the vlc-commits mailing list