About GStreamer 1.0 application development for beginners
Written in Japanese
This slides that was made for me to speak.
so, description in slides may not enough.
Agenda
- Overview
- Data structure
- The basic steps of gstreamer application development
- Tips...
State Change
NULL READYPAUSED PLAYING
NULL READY PAUSED PLAYING
詳しくはこちらを参照
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-elements-states.html
20.
Preroll は Stateではありません
Preroll を気にするのは Sink Element だけ ↓
ちなみに
NULL READY PAUSED PLAYING
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/chapter-other-base.html#section-base-sink
Prerolling
Prerolled
まとめ
- GStreamer Applicationは
2つ以上の Thread から成る
- Application thread
- Streaming threads
- Bus は Application thread と
Streaming threadの架け橋
- Pipeline
- Bus を持っている Bin
- Bin
- Element の集まり
- Pad
- Element の外界への
インターフェース
- Element States
- NULL, READY
PAUSED, PLAYING
- Communication
- Buffer, Event,
Message, Query
Event flow: _sink_event()
switch(GST_EVENT_TYPE(event)) {
case GST_EVENT_CAPS:
[..]
case GST_EVENT_EOS:
[..]
case GST_EVENT_STREAM_START:
[..]
case GST_EVENT_SEGMENT:
[..]
default:
ret = GST_VIDEO_ENCODER_CLASS (parent_class)->sink_event(enc,
event);
break;
}
33.
_chain (), _sink_event()
Pad に 何か が来た時の処理は、 Pad に登録する
gst_pad_set_chain_function (
basesink->sinkpad,
gst_base_sink_chain);
gst_pad_set_event_function (
qtdemux->sinkpad,
gst_qtdemux_handle_sink_event);
34.
ちなみに
gst-launch の -eオプションは pipeline に EOS Event を送ります
gst-launch
pipeline
bin
filter element
srcsink
sink element
sink
src element
src