Commit graph

18 commits

Author SHA1 Message Date
Olivier Crête
4fffbd2cd0 mpegvideoparse: Restore some unused variables as comments 2011-07-13 13:42:09 -04:00
Olivier Crête
35f85f978e mpegvideoparse: Fix set-but-unused warnings 2011-07-12 17:56:25 -04:00
Tim-Philipp Müller
e5f1cdd0e9 Revert "mpegvideoparse: fix timestamp generation"
This reverts commit 2271608c43.

This patch needs more work so it doesn't cause grave playback
regressions (multi-second freezes) with some files that have
slightly broken timestamps but play fine everywhere else.

https://bugzilla.gnome.org/show_bug.cgi?id=636279
https://bugzilla.gnome.org/show_bug.cgi?id=632222
2011-01-07 18:49:02 +00:00
Thijs Vermeir
2271608c43 mpegvideoparse: fix timestamp generation
Use information from the gop header and picture
header to calculate the picture timestamp. (time_code
and temporal_reference) and adapt to upstream timestamps if
provided.

https://bugzilla.gnome.org/show_bug.cgi?id=632222
2010-11-03 11:12:38 +01:00
Thijs Vermeir
96a7f9c8b1 mpegvideoparse: accelerate search for start code
As the startcode always starts with 0x000001 some iterations
can be skipped if values > 1 are detected.

~ 70% faster on HD video stream.

https://bugzilla.gnome.org/show_bug.cgi?id=632130
2010-10-14 18:52:27 +02:00
Austin Lund
2ed73a6ad0 mpegvideoparse: Remove redundant log message 2010-06-20 23:34:56 +10:00
Austin Lund
0fba38f833 mpegvideoparse: Added debugging output for mpegpacketiser 2010-06-16 10:39:04 +10:00
Jan Schmidt
2f9b765326 mpegvideoparse: Apply previous timestamp when there isn't any newer.
If the current incoming packet didn't carry a timestamp, but a
previous packet had one we didn't yet use, then apply that timestamp
to the next picture.
Fixes: #618336
2010-06-15 17:16:12 +10:00
Zaheer Abbas Merali
721643431e mpegvideoparse: fix crash if downstream is unliked
mpeg_packetizer_get_block() in some circumstances (here: if
downstream was unlinked) returns a block but does not set the
buffer causing mpegvideoparse_drain_avail() to cause invalid memory
access.

Fixes #619502.
2010-05-25 00:29:58 +01:00
Arun Raghavan
bf586d7966 mpegvideoparse: Export profile and level in caps
This exports profile and level in caps for MPEG 2 streams.

https://bugzilla.gnome.org/show_bug.cgi?id=616078
2010-04-18 12:50:26 +02:00
Arun Raghavan
8144fee47c mpegvideoparse: Parse bitrate and emit as tag
This patch picks up the bitrate for the stream from the MPEG sequence
header and emits it as a tag on the source pad.

Fixes #599298.
2010-03-22 12:44:54 +00:00
Benjamin Otte
f96e4f1581 Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-03-21 21:39:18 +01:00
Tim-Philipp Müller
10d67eda7a GstAdapter is not a GstObject and should be freed with g_object_unref() 2009-08-31 13:14:02 +01:00
Edward Hervey
0444aa3374 mpegvideoparse: Detect interlaced content and set it on outgoing caps.
I also added the parsing of all the other bits in the sequence extension
header in case we need it later.
2009-05-22 17:19:26 +02:00
Wim Taymans
2e75ee53cd gst/mpegvideoparse/mpegpacketiser.c: Small meaningless cleanup.
Original commit message from CVS:
* gst/mpegvideoparse/mpegpacketiser.c: (mpeg_util_find_start_code):
Small meaningless cleanup.
* gst/mpegvideoparse/mpegvideoparse.c: (gst_mpegvideoparse_flush),
(mpegvideoparse_drain_avail), (gst_mpegvideoparse_chain_forward),
(scan_keyframe), (gst_mpegvideoparse_flush_decode),
(gst_mpegvideoparse_chain_reverse), (gst_mpegvideoparse_chain),
(mpv_parse_sink_event), (gst_mpegvideoparse_change_state):
* gst/mpegvideoparse/mpegvideoparse.h:
Track segment events.
Do the first part of reverse playback by sending data between two
I-frames to the decoder.
2008-01-11 15:58:15 +00:00
Jan Schmidt
ceba19f691 gst/mpegvideoparse/: Fix some silly bugs with calculating the guard sizes.
Original commit message from CVS:
* gst/mpegvideoparse/mpegpacketiser.c:
(mpeg_util_parse_extension_packet), (mpeg_util_parse_sequence_hdr),
(mpeg_util_parse_picture_hdr):
* gst/mpegvideoparse/mpegvideoparse.c:
(mpegvideoparse_handle_sequence), (mpegvideoparse_drain_avail):
Fix some silly bugs with calculating the guard sizes.
Properly compare the old sequence header structure with the new one.
Don't error out on an invalid sequence - just ignore it.
2007-06-06 11:03:24 +00:00
Jan Schmidt
1ff2df1d5f gst/mpegvideoparse/: Move the MPEG specific byte parsing into the mpegpacketiser code.
Original commit message from CVS:
* gst/mpegvideoparse/mpegpacketiser.c: (mpeg_util_find_start_code),
(collect_packets), (set_par_from_dar), (set_fps_from_code),
(mpeg_util_parse_extension_packet), (mpeg_util_parse_sequence_hdr),
(mpeg_util_parse_picture_hdr):
* gst/mpegvideoparse/mpegpacketiser.h:
* gst/mpegvideoparse/mpegvideoparse.c:
(mpegvideoparse_handle_sequence), (mpegvideoparse_handle_picture),
(mpegvideoparse_drain_avail), (gst_mpegvideoparse_chain),
(mpv_parse_sink_event), (plugin_init):
* gst/mpegvideoparse/mpegvideoparse.h:
Move the MPEG specific byte parsing into the mpegpacketiser code.
Add parsing of picture types, that just feeds into a debug message
for now.
Fix some 64-bit format strings.
2007-03-16 11:22:47 +00:00
Jan Schmidt
1f7755917a Port mpeg1videoparse to 0.10 and give it rank SECONDARY-1, so that it's below existing decoders.
Original commit message from CVS:
* configure.ac:
* gst/mpeg1videoparse/Makefile.am:
* gst/mpeg1videoparse/gstmp1videoparse.c:
* gst/mpeg1videoparse/gstmp1videoparse.h:
* gst/mpeg1videoparse/mp1videoparse.vcproj:
* gst/mpegvideoparse/Makefile.am:
* gst/mpegvideoparse/mpegpacketiser.c: (mpeg_packetiser_init),
(mpeg_packetiser_free), (mpeg_packetiser_add_buf),
(mpeg_packetiser_flush), (mpeg_find_start_code),
(get_next_free_block), (complete_current_block),
(append_to_current_block), (start_new_block), (handle_packet),
(collect_packets), (mpeg_packetiser_handle_eos),
(mpeg_packetiser_get_block), (mpeg_packetiser_next_block):
* gst/mpegvideoparse/mpegpacketiser.h:
* gst/mpegvideoparse/mpegvideoparse.c: (mpegvideoparse_get_type),
(gst_mpegvideoparse_base_init), (gst_mpegvideoparse_class_init),
(mpv_parse_reset), (gst_mpegvideoparse_init),
(gst_mpegvideoparse_dispose), (set_par_from_dar),
(set_fps_from_code), (mpegvideoparse_parse_seq),
(gst_mpegvideoparse_time_code), (gst_mpegvideoparse_flush),
(mpegvideoparse_drain_avail), (gst_mpegvideoparse_chain),
(mpv_parse_sink_event), (gst_mpegvideoparse_change_state),
(plugin_init):
* gst/mpegvideoparse/mpegvideoparse.h:
* gst/mpegvideoparse/mpegvideoparse.vcproj:
Port mpeg1videoparse to 0.10 and give it rank SECONDARY-1, so
that it's below existing decoders.
Rename it to mpegvideoparse to reflect that it handles MPEG-1 and
MPEG-2 now.
Re-write the parsing code so that it collects packets differently
and timestamps Picture packets correctly.
Add a list of FIXME's at the top.
2007-03-15 20:48:08 +00:00