From 56b5aa1ccb50ba6225153a449823edc6fd7dbb89 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 7 Aug 2007 09:56:08 +0000 Subject: [PATCH] docs/design/part-TODO.txt: Add some more TODO items Original commit message from CVS: * docs/design/part-TODO.txt: Add some more TODO items * gst/gstbin.c: (find_message), (gst_bin_change_state_func): Improve debugging. * gst/gstcaps.c: (gst_caps_intersect): Optimize trivial intersection case between identical caps pointers. * gst/gstelement.c: (gst_element_continue_state), (gst_element_set_state_func): * gst/gstpad.c: Fix spelling and grammar mistakes. --- ChangeLog | 16 ++++++++++++++++ docs/design/part-TODO.txt | 22 ++++++++++++++++++++++ gst/gstbin.c | 8 ++++++++ gst/gstcaps.c | 10 ++++++++-- gst/gstelement.c | 2 +- gst/gstpad.c | 5 +++-- 6 files changed, 58 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55a7cb5..7810e62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-08-07 Wim Taymans + + * docs/design/part-TODO.txt: + Add some more TODO items + + * gst/gstbin.c: (find_message), (gst_bin_change_state_func): + Improve debugging. + + * gst/gstcaps.c: (gst_caps_intersect): + Optimize trivial intersection case between identical caps pointers. + + * gst/gstelement.c: (gst_element_continue_state), + (gst_element_set_state_func): + * gst/gstpad.c: + Fix spelling and grammar mistakes. + 2007-08-05 Stefan Kost * po/POTFILES.in: diff --git a/docs/design/part-TODO.txt b/docs/design/part-TODO.txt index e2d0b48..ae51a46 100644 --- a/docs/design/part-TODO.txt +++ b/docs/design/part-TODO.txt @@ -7,6 +7,9 @@ API/ABI keyframe, after the seek you want to get the new stream time that will actually be used to update the slider bar. +- make gst_pad_push_event() return a GstFlowReturn so that we can resend + NEWSEGMENT and other events. + - GstEvent, GstMessage register like GstFormat or GstQuery. - query POSITION/DURATION return accuracy. Just a flag or accuracy percentage. @@ -22,6 +25,25 @@ API/ABI - use | instead of + as divider in serialization of Flags (gstvalue/gststructure) +- rethink how we handle dynamic replugging wrt segments and other events that + already got pushed and need to be pushed again. + +- keep track of seeks with a counter so that we can match seek events received + in the demuxer srcpads. This is needed because a normal seek on a pipeline + will send the seek event on all sinks, which results in the demuxer receiving + the seek twice. If there is no way to see that the seek is the same, it will + perform the seek twice. + It would also be nice to have this same sequence number in the segment event + that resulted from the seek so that everything seek related can be tracked + properly. + +- When an element goes to PAUSED there is no way to figure out the running time + when this happened. One could think that we can store this time in the + base_time field of the element but that causes problems when the element is + still using the base_time before really PAUSING. We seem to need a new element + field for this. The running time when an element is paused can be usefull to + clip late buffers instead of prerolling on them. + IMPLEMENTATION -------------- diff --git a/gst/gstbin.c b/gst/gstbin.c index e0f1c16..1085e8c 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -731,6 +731,14 @@ find_message (GstBin * bin, GstObject * src, GstMessageType types) result = g_list_find_custom (bin->messages, &find, (GCompareFunc) message_check); + if (result) { + GST_DEBUG_OBJECT (bin, "we found a message %p from %s mathing types %08x", + result->data, GST_OBJECT_NAME (GST_MESSAGE_CAST (result->data)->src), + types); + } else { + GST_DEBUG_OBJECT (bin, "no message found matching types %08x", types); + } + return result; } diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 0e21170..740bed4 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -1214,9 +1214,15 @@ gst_caps_intersect (const GstCaps * caps1, const GstCaps * caps2) g_return_val_if_fail (GST_IS_CAPS (caps1), NULL); g_return_val_if_fail (GST_IS_CAPS (caps2), NULL); - if (gst_caps_is_empty (caps1) || gst_caps_is_empty (caps2)) { + /* caps are exactly the same pointers, just copy one caps */ + if (caps1 == caps2) + return gst_caps_copy (caps1); + + /* empty caps on either side, return empty */ + if (gst_caps_is_empty (caps1) || gst_caps_is_empty (caps2)) return gst_caps_new_empty (); - } + + /* one of the caps is any, just copy the other caps */ if (gst_caps_is_any (caps1)) return gst_caps_copy (caps2); if (gst_caps_is_any (caps2)) diff --git a/gst/gstelement.c b/gst/gstelement.c index 5745ef1..07b647a 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -2344,7 +2344,7 @@ gst_element_set_state_func (GstElement * element, GstState state) (next != state ? "intermediate" : "final"), gst_element_state_get_name (current), gst_element_state_get_name (next)); - /* now signal any waiters, they will error since the cookie was increased */ + /* now signal any waiters, they will error since the cookie was incremented */ GST_STATE_BROADCAST (element); GST_OBJECT_UNLOCK (element); diff --git a/gst/gstpad.c b/gst/gstpad.c index 23863d1..62ec350 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -4327,8 +4327,9 @@ gst_pad_start_task (GstPad * pad, GstTaskFunction func, gpointer data) * gst_pad_pause_task: * @pad: the #GstPad to pause the task of * - * Pause the task of @pad. This function will also make sure that the - * function executed by the task will effectively stop. + * Pause the task of @pad. This function will also wait until the + * function executed by the task is finished if this function is not + * called from the task function. * * Returns: a TRUE if the task could be paused or FALSE when the pad * has no task. -- 2.7.4