summaryrefslogtreecommitdiffstats
path: root/gst/flv/gstflvdemux.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-24gst/flv/gstflvdemux.c: Fix non key unit seeking by always going to the ↵Julien Moutte1-3/+9
previous keyframe. Mark the discont flag when ... Original commit message from CVS: 2008-11-24 Julien Moutte <julien@fluendo.com> * gst/flv/gstflvdemux.c: (gst_flv_demux_find_offset), (gst_flv_demux_handle_seek_push), (gst_flv_demux_handle_seek_pull): Fix non key unit seeking by always going to the previous keyframe. Mark the discont flag when we've moved in the file. * gst/flv/gstflvparse.c: (gst_flv_parse_audio_negotiate): MP3 streams are parsed already, makes autoplugged pipelines shorter.
2008-10-28gst/flv/gstflvdemux.c: Implement position query in time format.Sebastian Dröge1-0/+22
Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_query): Implement position query in time format.
2008-10-28gst/flv/: Put the GstSegment directly into the instance struct instead of ↵Sebastian Dröge1-62/+53
allocating and free'ing it again. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_loop), (gst_flv_demux_handle_seek_push), (gst_flv_demux_handle_seek_pull), (gst_flv_demux_sink_event), (gst_flv_demux_dispose), (gst_flv_demux_init): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp): Put the GstSegment directly into the instance struct instead of allocating and free'ing it again. Push tags already if only one pad was added, no need to wait for the second one. When generating our index set has_video and has_audio if we find video or audio in case the FLV header has incorrect data.
2008-10-27gst/flv/: Don't memcpy() all data we want to push downstream, instead just ↵Sebastian Dröge1-40/+38
create subbuffers and push them downstream. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_pull_header), (gst_flv_demux_create_index): * gst/flv/gstflvparse.c: (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp), (gst_flv_parse_tag_type), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Don't memcpy() all data we want to push downstream, instead just create subbuffers and push them downstream. Fix some minor memory leaks.
2008-10-27gst/flv/gstflvdemux.c: Don't post an error message on the bus if sending EOS ↵Sebastian Dröge1-27/+17
downstream didn't work. Fixes bug #550454. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_loop), (gst_flv_demux_find_offset), (gst_flv_demux_handle_seek_push), (gst_flv_demux_handle_seek_pull): Don't post an error message on the bus if sending EOS downstream didn't work. Fixes bug #550454. Fix seek event handling to look at the flags of the seek event instead of assuming some random flags, don't send segment-start messages when operating in push mode and push seek events upstream if we couldn't handle them.
2008-10-27gst/flv/gstflvdemux.c: Error out early if pulling a tag failed.Sebastian Dröge1-0/+3
Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_pull_tag): Error out early if pulling a tag failed.
2008-10-27gst/flv/: In pull mode we create our own index before doing anything else ↵Sebastian Dröge1-31/+32
and don't use the index provided by some fi... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_create_index), (gst_flv_demux_loop): * gst/flv/gstflvparse.c: (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp): * gst/flv/gstflvparse.h: In pull mode we create our own index before doing anything else and don't use the index provided by some files (which are more than often incorrect and cause failed seeks). For push mode we still use the index provided by the file and extend it while doing the playback.
2008-10-27gst/flv/gstflvdemux.c: Instead of using gst_pad_event_default() use a small ↵Sebastian Dröge1-9/+25
gst_pad_push_event() wrapper that only do... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_push_src_event), (gst_flv_demux_loop), (gst_flv_demux_handle_seek_pull), (gst_flv_demux_sink_event): Instead of using gst_pad_event_default() use a small gst_pad_push_event() wrapper that only does what we want and is much more simple.
2008-10-27gst/flv/gstflvdemux.*: If our index was created by the element and not ↵Sebastian Dröge1-0/+12
provided from the outside we should destroy it... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_change_state), (gst_flv_demux_set_index), (gst_flv_demux_init): * gst/flv/gstflvdemux.h: If our index was created by the element and not provided from the outside we should destroy it when starting a new stream to get all old entries removed.
2008-10-27gst/flv/gstflvdemux.c: Improve debugging a bit when pulling a buffer from ↵Sebastian Dröge1-3/+6
upstream fails. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_pull_range): Improve debugging a bit when pulling a buffer from upstream fails.
2008-10-27gst/flv/: Close the currently playing segment from the streaming thread ↵Sebastian Dröge1-9/+23
instead of the thread where the seek event is... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_handle_seek_pull), (gst_flv_demux_dispose): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Close the currently playing segment from the streaming thread instead of the thread where the seek event is handled.
2008-10-12gst/flv/gstflvdemux.c: Fix regression of handling flow returns in pull mode.Sebastian Dröge1-6/+6
Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_pull_tag), (gst_flv_demux_pull_header): Fix regression of handling flow returns in pull mode. Fixes bug #556003.
2008-10-09gst/flv/: Get an approximate duration of the file by looking at the ↵Sebastian Dröge1-0/+32
timestamp of the last tag in pull mode. If we get... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_loop): * gst/flv/gstflvparse.c: (gst_flv_parse_tag_timestamp): * gst/flv/gstflvparse.h: Get an approximate duration of the file by looking at the timestamp of the last tag in pull mode. If we get (maybe better) duration from metadata later we'll use that instead.
2008-10-09gst/flv/gstflvdemux.c: Refactor _pull_range() logic with checks into a ↵Sebastian Dröge1-39/+31
seperate function to make things a bit more re... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_pull_range), (gst_flv_demux_pull_tag), (gst_flv_demux_pull_header): Refactor _pull_range() logic with checks into a seperate function to make things a bit more readable.
2008-10-09gst/flv/gstflvdemux.c: Use gst_element_class_set_details_simple().Sebastian Dröge1-10/+11
Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_chain), (gst_flv_demux_base_init): Use gst_element_class_set_details_simple(). If we get GST_FLOW_NOT_LINKED in the parse loop but at least one of the pads is linked continue the loop.
2008-10-09gst/flv/gstflvdemux.c: Go out of the parse loop as soon as we get an error ↵Sebastian Dröge1-1/+9
instead of parsing until the GstAdapter is... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_chain): Go out of the parse loop as soon as we get an error instead of parsing until the GstAdapter is empty. Add some explanations about the header and tag size. Don't print synchronizing message if everything is fine.
2008-10-09gst/flv/: Add first version of a FLV muxer. The only missing feature is ↵Sebastian Dröge1-2/+5
writing of stream metadata. Original commit message from CVS: * gst/flv/Makefile.am: * gst/flv/gstflvdemux.c: (plugin_init): * gst/flv/gstflvmux.c: (gst_flv_mux_base_init), (gst_flv_mux_class_init), (gst_flv_mux_init), (gst_flv_mux_finalize), (gst_flv_mux_reset), (gst_flv_mux_handle_src_event), (gst_flv_mux_handle_sink_event), (gst_flv_mux_video_pad_setcaps), (gst_flv_mux_audio_pad_setcaps), (gst_flv_mux_request_new_pad), (gst_flv_mux_release_pad), (gst_flv_mux_write_header), (gst_flv_mux_write_buffer), (gst_flv_mux_collected), (gst_flv_mux_change_state): * gst/flv/gstflvmux.h: Add first version of a FLV muxer. The only missing feature is writing of stream metadata.
2008-06-13gst/flv/: Introduce demuxing support for AAC andJulien Moutte1-0/+20
Original commit message from CVS: 2008-06-14 Julien Moutte <julien@fluendo.com> * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_dispose): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_audio_negotiate), (gst_flv_parse_tag_audio), (gst_flv_parse_video_negotiate), (gst_flv_parse_tag_video): Introduce demuxing support for AAC and H.264/AVC inside FLV. * sys/dshowdecwrapper/gstdshowaudiodec.c: (gst_dshowaudiodec_init), (gst_dshowaudiodec_chain), (gst_dshowaudiodec_push_buffer), (gst_dshowaudiodec_sink_event), (gst_dshowaudiodec_setup_graph): * sys/dshowdecwrapper/gstdshowaudiodec.h: * sys/dshowdecwrapper/gstdshowvideodec.c: (gst_dshowvideodec_init), (gst_dshowvideodec_sink_event), (gst_dshowvideodec_chain), (gst_dshowvideodec_push_buffer), (gst_dshowvideodec_src_getcaps): * sys/dshowdecwrapper/gstdshowvideodec.h: Lot of random fixes to improve stability (ref counting, safety checks...)
2008-04-25gst/flv/gstflvdemux.c: Forward unknown queries upstream instead of returning ↵Wim Taymans1-3/+1
FALSE on them. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_query): Forward unknown queries upstream instead of returning FALSE on them.
2007-09-12gst/: Printf format fixes (#476128).Peter Kjellerstedt1-2/+4
Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst-libs/gst/app/gstappsink.c: * gst/flv/gstflvdemux.c: * gst/flv/gstflvparse.c: * gst/interleave/deinterleave.c: * gst/switch/gstswitch.c: Printf format fixes (#476128).
2007-08-27gst/flv/gstflvdemux.c: Make sure we initialize the seek result.Julien Moutte1-0/+1
Original commit message from CVS: 2007-08-27 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_handle_seek_pull): Make sure we initialize the seek result.
2007-08-24gst/flv/gstflvdemux.c: Remove some useless ifdef.Julien Moutte1-2/+0
Original commit message from CVS: 2007-08-24 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_flush), (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_find_offset), (gst_flv_demux_handle_seek_push), (gst_flv_demux_handle_seek_pull), (gst_flv_demux_sink_event), (gst_flv_demux_src_event): Remove some useless ifdef.
2007-08-24gst/flv/gstflvdemux.c: Implement seeking in push mode.Julien Moutte1-34/+164
Original commit message from CVS: 2007-08-24 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_flush), (gst_flv_demux_cleanup), (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_find_offset), (gst_flv_demux_handle_seek_push), (gst_flv_demux_handle_seek_pull), (gst_flv_demux_sink_event), (gst_flv_demux_src_event): Implement seeking in push mode. * gst/flv/gstflvdemux.h:
2007-08-22gst/flv/: Handle pixel aspect ratio through metadata tags like ASF does. ↵Julien Moutte1-0/+3
Fluendo muxer supports this and Original commit message from CVS: 2007-08-22 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_pull_tag): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Handle pixel aspect ratio through metadata tags like ASF does. Fluendo muxer supports this and Flash players can support it as well this way.
2007-08-22gst/flv/: Make sure we don't try filling up the index if no times object was ↵Julien Moutte1-0/+3
parsed. Fix the way we decide to push ta... Original commit message from CVS: 2007-08-22 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_pull_tag): * gst/flv/gstflvparse.c: (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Make sure we don't try filling up the index if no times object was parsed. Fix the way we decide to push tags and emit no-more-pads. Fix some printf typing in debugging.
2007-08-14gst/flv/gstflvdemux.c: Fix locking and refcounting on the index.Wim Taymans1-1/+12
Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_set_index), (gst_flv_demux_get_index): Fix locking and refcounting on the index.
2007-08-14gst/flv/gstflvdemux.c: First method for seeking in pull mode using the index ↵Julien Moutte1-6/+325
built step by step or coming from metadata. Original commit message from CVS: 2007-08-14 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_adapter_flush), (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_do_seek), (gst_flv_demux_handle_seek), (gst_flv_demux_sink_event), (gst_flv_demux_src_event), (gst_flv_demux_query), (gst_flv_demux_change_state), (gst_flv_demux_set_index), (gst_flv_demux_get_index), (gst_flv_demux_dispose), (gst_flv_demux_class_init): First method for seeking in pull mode using the index built step by step or coming from metadata. * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (FLV_GET_STRING), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Parse more metadata types and keyframes index.
2007-07-25gst/flv/: Handle not linked pads, try to make it reusable, more safety checks.Julien Moutte1-8/+66
Original commit message from CVS: 2007-07-25 Julien MOUTTE <julien@moutte.net> (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_change_state), (gst_flv_demux_dispose), (gst_flv_demux_init): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (FLV_GET_STRING), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Handle not linked pads, try to make it reusable, more safety checks.
2007-07-19Adds a first draft of an FLV demuxer.Julien Moutte1-0/+675
Original commit message from CVS: 2007-07-19 Julien MOUTTE <julien@moutte.net> * configure.ac: * gst/flv/Makefile.am: * gst/flv/gstflvdemux.c: (gst_flv_demux_flush), (gst_flv_demux_cleanup), (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_pull_header), (gst_flv_demux_seek_to_prev_keyframe), (gst_flv_demux_loop), (gst_flv_demux_sink_activate), (gst_flv_demux_sink_activate_push), (gst_flv_demux_sink_activate_pull), (gst_flv_demux_sink_event), (gst_flv_demux_change_state), (gst_flv_demux_dispose), (gst_flv_demux_base_init), (gst_flv_demux_class_init), (gst_flv_demux_init), (plugin_init): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (FLV_GET_BEUI24), (FLV_GET_STRING), (gst_flv_demux_query_types), (gst_flv_demux_query), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_type), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Adds a first draft of an FLV demuxer. It does not do seeking yet, it supports pull and push mode so YES you can use it to play youtube videos directly from an HTTP uri. Not so much testing done yet but it parses metadata, reply to duration queries, etc...