| 1 |
This document contains some ideas that can be used to implement |
| 2 |
interactivity in media content. |
| 3 |
|
| 4 |
Possible application: DVD navigation, flash,... |
| 5 |
|
| 6 |
Requirements |
| 7 |
------------ |
| 8 |
|
| 9 |
- capture mouse clicks, mouse position, movement occurring on |
| 10 |
a video display plugin |
| 11 |
- transport these events to the interested plugins |
| 12 |
- allow for automation (ie, the technique should work without |
| 13 |
a video plugin too) |
| 14 |
- the core doesn't care |
| 15 |
|
| 16 |
Capturing events |
| 17 |
---------------- |
| 18 |
|
| 19 |
- the videosink element captures mouse events |
| 20 |
- event is encapsulated into a generic data structure |
| 21 |
describing the event (need to define a caps?) |
| 22 |
- event is signalled to the app?. |
| 23 |
- event is sent upstream? |
| 24 |
|
| 25 |
* videosink has to add something to the main_loop to |
| 26 |
be able to grab events |
| 27 |
* thread issues? |
| 28 |
* does the app need to know about the events? |
| 29 |
|
| 30 |
- app captures mouse events |
| 31 |
- no idea if that's possible |
| 32 |
- app sends events upstream |
| 33 |
|
| 34 |
Sending events to plugins |
| 35 |
------------------------- |
| 36 |
|
| 37 |
- are sent upstream using the event methods |
| 38 |
* more generic |
| 39 |
* less app control |
| 40 |
|
| 41 |
- are sent to the appropriate plugin by the app |
| 42 |
* app needs to know what plugins are interested, |
| 43 |
less generic. |
| 44 |
* more app control |
| 45 |
|
| 46 |
automation will always work, the app can construct navigation |
| 47 |
events and insert them into the pipeline. |
| 48 |
|
| 49 |
What about flushing to minimize latency? |
| 50 |
|
| 51 |
|
| 52 |
Defining an event |
| 53 |
----------------- |
| 54 |
|
| 55 |
some ideas: |
| 56 |
|
| 57 |
GST_CAPS_NEW ( |
| 58 |
"videosink_event", |
| 59 |
"application/x-gst-navigation" |
| 60 |
"type", "click", |
| 61 |
"x_pos", 30, |
| 62 |
"y_pos", 40 |
| 63 |
) |
| 64 |
|
| 65 |
GST_CAPS_NEW ( |
| 66 |
"videosink_event", |
| 67 |
"application/x-gst-navigation" |
| 68 |
"type", "move", |
| 69 |
"x_pos", 30, |
| 70 |
"y_pos", 40 |
| 71 |
) |
| 72 |
|
| 73 |
... |
| 74 |
|
| 75 |
do we need a library for this? |
| 76 |
|
| 77 |
do we use custom events and use the mime type to detect the |
| 78 |
type? do we create a GST_EVENT_NAVIGATION? |
| 79 |
|
| 80 |
can we encapsulate all events into a GstCaps? I would think so |
| 81 |
|
| 82 |
Random thoughts |
| 83 |
--------------- |
| 84 |
|
| 85 |
- we're basically defining an event model, I don't think there is |
| 86 |
anything wrong with that. |
| 87 |
- how is our coordinate system going to work? do |
| 88 |
we use normalized values, 0-1000000 (or floats) |
| 89 |
or real pixel values? real pixel values require scalers to adjust |
| 90 |
the values (I don't think I like that) |
| 91 |
|
| 92 |
|
| 93 |
|