After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 464419 - oggmux needs to handle seek-event
oggmux needs to handle seek-event
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-07 16:22 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2008-07-25 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-07 16:22:45 UTC
oggmux currently rejects seek-events. If I put adder-alike code in there the EOS and SEGMEN_DONE behaviour works with oggmux, but generated files are illegal (cause crash in oggdemux when playing).

  • #0 ??
  • #1 ??
  • #2 ??
    from /opt/gnome/lib/libglib-2.0.so.0
  • #3 ??
  • #4 __nanosleep_nocancel
    from /lib/libpthread.so.0
  • #5 g_usleep
    at gtimer.c line 323
  • #6 fault_handler_sigaction
    at gst-launch.c line 204
  • #7 <signal handler called>
  • #8 gst_ogg_chain_get_stream
    at gstoggdemux.c line 1328
  • #9 gst_ogg_chain_has_stream
    at gstoggdemux.c line 1340
  • #10 gst_ogg_demux_loop
    at gstoggdemux.c line 2671
  • #11 gst_task_func
    at gsttask.c line 192
  • #12 g_thread_pool_thread_proxy
    at gthreadpool.c line 265

Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-09 09:27:22 UTC
> ogginfo test.ogg 
Processing file "test.ogg"...

Warning: Invalid header page, no packet found
Warning: Invalid header page in stream 1, contains multiple packets
New logical stream (#1, serial: 4584cc56): type invalid
Warning: stream start flag not set on stream 1
Warning: sequence number gap in stream 1. Got page 2 when expecting page 0. Indicates missing data.
Logical stream 1 ended
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-09 12:32:15 UTC
When I just comment out the special seek handling in gst_ogg_mux_handle_src_event() (so that is uses gst_pad_event_default(), then it handles EOS, but the file is broken (see comment #1)

this is patched and 2nd example is default (cvs version). whats the problem here. Why does the code triggered on eos create broken files?

> GST_DEBUG="*:2,vorbisenc:3,oggmux:4" ./bt-cmd --command=encode --input-file=../share/buzztard/songs/melo1.xml --output-file=$HOME/temp/melo1.ogg
0:00:00.577449000  6392 0x804fe08 DEBUG               oggmux gstoggmux.c:411:gst_ogg_mux_request_new_pad:<oggmux> Creating new pad for serial 946497966
0:00:00.578297000  6392 0x804fe08 DEBUG               oggmux gstoggmux.c:371:gst_ogg_mux_sinkconnect:<oggmux> sinkconnect triggered on sink_946497966
0:00:01.043822000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:811:gst_ogg_mux_queue_pads:<oggmux> got incaps buffer in control state, ignoring
0:00:01.043954000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:01.044026000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:811:gst_ogg_mux_queue_pads:<oggmux> got incaps buffer in control state, ignoring
0:00:01.044088000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:01.044154000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:811:gst_ogg_mux_queue_pads:<oggmux> got incaps buffer in control state, ignoring
0:00:01.044214000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:01.045499000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:817:gst_ogg_mux_queue_pads:<oggmux> got data buffer in control state, switching to data mode
0:00:01.045565000  6392 0x81a08c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:01.186734000  6392 0x8259fd8 WARN              pipeline gstpipeline.c:491:gst_pipeline_change_state:<song> failed to query pipeline latency
00:07.25
00:00:02.140397000  6392 0x819acc8 DEBUG               oggmux gstoggmux.c:823:gst_ogg_mux_queue_pads:<oggmux:sink_946497966> EOS on pad
0:00:02.140522000  6392 0x819acc8 DEBUG               oggmux gstoggmux.c:1399:gst_ogg_mux_process_best_pad:<oggmux:sink_946497966> swapping in EOS packet
0:00:02.140603000  6392 0x819acc8 DEBUG               oggmux gstoggmux.c:823:gst_ogg_mux_queue_pads:<oggmux:sink_946497966> EOS on pad
0:00:02.140667000  6392 0x819acc8 DEBUG               oggmux gstoggmux.c:1578:gst_ogg_mux_collected:<oggmux> Pushing EOS
00:08.000

ensonic@hoshi:~/buzztard/bin> GST_DEBUG="*:2,vorbisenc:3,oggmux:4" ./bt-cmd --command=encode --input-file=../share/buzztard/songs/melo1.xml --output-file=$HOME/temp/melo1.ogg
0:00:00.389443000  8135 0x804fe08 DEBUG               oggmux gstoggmux.c:411:gst_ogg_mux_request_new_pad:<oggmux> Creating new pad for serial 1264230769
0:00:00.389734000  8135 0x804fe08 DEBUG               oggmux gstoggmux.c:371:gst_ogg_mux_sinkconnect:<oggmux> sinkconnect triggered on sink_1264230769
0:00:00.935608000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:811:gst_ogg_mux_queue_pads:<oggmux> got incaps buffer in control state, ignoring
0:00:00.935749000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:00.935828000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:811:gst_ogg_mux_queue_pads:<oggmux> got incaps buffer in control state, ignoring
0:00:00.935896000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:00.935968000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:811:gst_ogg_mux_queue_pads:<oggmux> got incaps buffer in control state, ignoring
0:00:00.936034000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:00.937328000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:817:gst_ogg_mux_queue_pads:<oggmux> got data buffer in control state, switching to data mode
0:00:00.937401000  8135 0x81a05c0 DEBUG               oggmux gstoggmux.c:1551:gst_ogg_mux_collected:<oggmux> No buffer available on best pad
0:00:00.939392000  8135 0x804fe08 WARN               bt-core song.c:448:on_song_state_changed: bin failed to handle seek event
0:00:00.939665000  8135 0x804fe08 WARN              pipeline gstpipeline.c:491:gst_pipeline_change_state:<song> failed to query pipeline latency
00:08.125
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-09 12:48:35 UTC
To make it crystal clear. I don't want to seek. My app is sending the seek to tell about the playback-segment. I send that to the pipeline and it will send it to elements staring from the sinks. If oggmux reject it, the sources never get a newsegment and the pipeline will never stop.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2007-11-12 08:54:40 UTC
The docs for gst_event_new_eos() says:
Create a new EOS event. The eos event can only travel downstream synchronized with the buffer flow.

Filesink cannot do it as it works based on bytes and not time. So imho it has to be the muxer. After some look at oggmux and avimux, they only sent eos, when their pads are done. How should that work when one does e.g. a timed live-capture?
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2008-07-25 15:59:22 UTC
I now set num-buffer on all my source elements so that thay send EOS.