8d8797794fbde4b4da420ff539e9189fe4c08669
[platform/upstream/gstreamer.git] / docs / design / part-TODO.txt
1 TODO - Future Development
2 -------------------------
3
4 API/ABI
5 ~~~~~~~
6
7 - implement return values from events in addition to the gboolean. This should
8   be done by making the event contain a GstStructure with input/output values,
9   similar to GstQuery. A typical use case is performing a non-accurate seek to a
10   keyframe, after the seek you want to get the new stream time that will
11   actually be used to update the slider bar.
12
13 - make gst_pad_push_event() return a GstFlowReturn so that we can resend
14   NEWSEGMENT and other events.
15
16 - GstEvent, GstMessage register like GstFormat or GstQuery.
17
18 - query POSITION/DURATION return accuracy. Just a flag or accuracy percentage.
19
20 - use | instead of + as divider in serialization of Flags
21   (gstvalue/gststructure)
22
23 - rethink how we handle dynamic replugging wrt segments and other events that
24   already got pushed and need to be pushed again. Might need GstFlowReturn from
25   gst_pad_push_event().
26
27 - Optimize negotiation. We currently do a get_caps() call when we link pads,
28   which could potentially generate a huge list of caps and all their
29   combinations, we need to avoid generating these huge lists by generating them
30   incrementaly when needed. We can do this with a gst_pad_iterate_caps() call.
31   We also need to incrementally return intersections etc, for this.
32
33 - Elements in a bin have no clue about the final state of the parent element
34   since the bin sets the target state on its children in small steps. This
35   causes problems for elements that like to know the final state (rtspsrc going
36   to PAUSED or READY is different in that we can avoid sending the useless
37   PAUSED request).
38
39 - Make serialisation of structures more consistent, readable and nicer code-wise.
40
41 - pad block has several issues: 
42   * can't block on selected things, like push, pull, pad_alloc, events, ...
43   * can't check why the block happened. We should also be able to get the item/
44     reason that blocked the pad. 
45   * it only blocks on datapassing. When EOS, the block never happens but ideally
46     should because pad block should inform the app when there is no dataflow.
47   * the same goes for segment seeks that don't push in-band EOS events. Maybe
48     segment seeks should also send an EOS event when they're done.
49   * blocking should only happen from one thread. If one thread does pad_alloc
50     and another a push, the push might be busy while the block callback is done.
51   * maybe this name is overloaded. We need to look at some more use cases before
52     trying to fix this.
53
54 - rethink the way we do upstream renegotiation. Currently it's done with
55   pad_alloc but this has many issues such as only being able to suggest 1 format
56   and the need to allocate a buffer of this suggested format (some elements such
57   as capsfilter only know about the format, not the size). We would ideally like
58   to let upstream renegotiate a new format just like it did when it started.
59   This could, for example, easily be triggered with a RENEGOTIATE event.
60
61 - Remove the result format value in queries.
62
63 - Try to minimize the amount of acceptcaps calls when pushing buffers around.
64   The element pushing the buffer usually negotiated already and decided on the
65   format.
66   The element receiving the buffer usually has to accept the caps anyway.
67
68
69 IMPLEMENTATION
70 ~~~~~~~~~~~~~~
71
72 - implement more QOS, see part-qos.txt.
73
74 - implement BUFFERSIZE.
75
76 - implement pad_block with probes? see above.
77
78
79 DESIGN
80 ~~~~~~
81
82 - unlinking pads in the PAUSED state needs to make sure the stream thread is not
83   executing code. Can this be done with a flush to unlock all downstream chain
84   functions? Do we do this automatically or let the app handle this?
85