Commit graph

277 commits

Author SHA1 Message Date
Nicolas Dufresne
d02e7d8029 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:07:56 -04:00
Jan Schmidt
09f412dc3c mpeg2dec: Fix latency calculation
The latency calculation was missing a scaling by GST_SECOND,
so it would always report a tiny latency. Fix that.

Spotted by Guillaume Desmottes.
2017-03-01 23:04:00 +11:00
Nirbheek Chauhan
c8260a1545 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:29:37 +01:00
Tim-Philipp Müller
bb5a13e848 mpeg2dec: remove file no longer used or needed 2016-08-19 13:01:39 +01:00
Tim-Philipp Müller
fd5a868c11 mpeg2dec: bump libmpeg2 requirement to 0.5.1 and fix msvc build
libmpeg2 0.5.1 was released in mid-2008, let's bump the requirement
and get rid of version-dependent code paths. There's still
avdec_mpeg2video for those who are stuck on ancient distros which
we don't target any more.

Also fixes build with MSVC, which doesn't like #if #else #endif
inside macro arguments (like the GST_DEBUG_OBJECT in line 941).
2016-04-15 18:43:27 +01:00
Vineeth TM
eacdaa56b3 ugly: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763082
2016-03-24 14:38:13 +02:00
Tim-Philipp Müller
b0434ddf4e mpeg2dec: don't use exported but undeclared core debug category symbols
It's not right and won't work on Windows with MSVC.
2016-02-20 11:55:37 +00:00
Edward Hervey
e9a04cd153 mpeg2dec: Demote rank to SECONDARY
https://bugzilla.gnome.org/show_bug.cgi?id=574461
2016-01-21 17:38:34 +01:00
Thiago Santos
c1211659cc mpeg2dec: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query
2015-08-15 11:54:11 -03:00
Guillaume Desmottes
ca5fd56862 mpeg2dec: fix buffer leak in crop_buffer()
gst_buffer_pool_acquire_buffer() gives us a new owned buffer while
gst_buffer_replace() reffed it as well so we were one reference extra.

https://bugzilla.gnome.org/show_bug.cgi?id=746887
2015-03-30 16:19:00 -04:00
Luis de Bethencourt
31bf54a076 mpeg2dec: fix memory leak
CID #1291630
2015-03-24 12:51:36 +00:00
Luis de Bethencourt
d077a3a300 mpeg2dec: initialize buffer
Buffer needs to be null before passing it to gst_buffer_pool_acquire_buffer()

CID #1291634
2015-03-24 10:29:52 +00:00
Nicolas Dufresne
35c937f2a4 mpeg2dec: Add stride support
This allow using external pools that have different strides from the
default. These strides need to respect certain rules, which we check
and if these are not met, we fallback to generic pool.

https://bugzilla.gnome.org/show_bug.cgi?id=735379
2015-03-13 17:00:03 +00:00
Nicolas Dufresne
7e8050728a mpeg2dec: Re-implement pool handling
This is a rewrite of the pool negotiation and configuration. Direct
to output decoding is now achieved by configuring the pool using
video-alignment. This removes copies when dealing with any elements that
supports VideoAlignment, and enable usage of generic video buffer pool,
XVImagePool and GLPool. It drops the crop meta implementation for now.

https://bugzilla.gnome.org/show_bug.cgi?id=735379
2015-03-13 09:56:00 +00:00
Nicolas Dufresne
77126f73c5 Revert "mpeg2dec: Fix handling of stride"
This reverts commit f3e8dcb9de.
2015-03-09 19:11:51 +00:00
Nicolas Dufresne
d86e34a41e Revert "mpeg2dec: Use propose unref method for buffer"
This reverts commit 63b43d3bee.
2015-03-09 19:11:44 +00:00
Nicolas Dufresne
63b43d3bee mpeg2dec: Use propose unref method for buffer 2015-03-09 18:43:43 +00:00
Simon Farnsworth
f3e8dcb9de mpeg2dec: Fix handling of stride
A pipeline like:

gst-launch-1.0 filesrc location=file.ts ! tsdemux ! mpegvideoparse ! mpeg2dec  ! vaapisink

would look bad when file.ts contains 704x576 video, because vaapisink would
give you buffers of stride 768, but libmpeg2 was not told about this and
used a stride of 704.

Tell libmpeg2 about the stride from  downstream; in the process, teach it to
reject buffer pools that don't meet libmpeg2's chroma stride requirements

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
2015-02-15 15:11:41 -06:00
Tim-Philipp Müller
b2e13b82aa mpeg2dec: remove unused struct members 2014-05-16 16:24:46 +01:00
Edward Hervey
a665347345 mpeg2dec: Release codec state on negotiation failures
Else it leaks

CID #1212169
2014-05-09 14:54:54 +02:00
Vincent Penquerc'h
6b887060b1 mpeg2dec: do not reset the whole video info when setting size
New changes to gstvideo will reset all the video info state
when calling _set_format, overwriting what was previously set
in the preceding code.

The comment says the following code is meant to preserve the
pre-crop size, so let's just keep the size and related data
 as this does not seem to break anything else (this is what
the _set_format call would have set before the change that
reset all data, except the colorimetry).
2014-04-04 10:58:50 +01:00
Sebastian Dröge
6049866ca6 mpeg2dec: Use new gst_video_decoder_set_needs_format() API 2013-12-05 11:44:10 +01:00
Mark Nauwelaerts
8c1be8796e mpeg2dec: graceful degradation for badly parsed input 2013-11-11 13:25:22 +01:00
Sebastian Dröge
22b3a60dbd mpeg2dec: Fix mpeg2_reset() calls 2013-08-15 15:30:31 +02:00
Sebastian Dröge
f541f94262 ext: Use new flush vfunc of video codec base classes and remove reset implementations 2013-08-15 15:27:48 +02:00
Edward Hervey
96c15877f2 mpeg2dec: Do a hard reset of flush_stop
Which is notified by hard == 0 with latest refactoring.
2013-08-02 08:25:49 +02:00
Sebastian Dröge
f8e05c2af0 mpeg2dec: Clean up reset/start/stop handling 2013-07-25 13:35:44 +02:00
Edward Hervey
576fe462bc mpeg2dec: Properly reset on sequence changes
Otherwise we end up using stray data/buffers.

Fixes #690701
2013-07-17 16:17:54 +02:00
Sreerenj Balachandran
866f60cce6 mpeg2dec: make the aspect ratio calculation more accurate.
Utilize the libmpeg2 api: mpeg2_guess_aspect() to guess the
aspect-ratio if we don't have a valid upstream PAR.

https://bugzilla.gnome.org/show_bug.cgi?id=685103
2013-06-04 17:29:31 +02:00
Sebastian Dröge
ef182de45f gst: Add better support for static plugins 2013-04-15 15:56:02 +02:00
Thijs Vermeir
6461d0e035 mpeg2dec: use appropriate printf format for gsize 2012-12-19 17:16:53 +01:00
Tim-Philipp Müller
9c690b2018 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:40:37 +00:00
Jan Schmidt
6d35db313f mpeg2dec: Don't error out when there is no associated buffer
In 0.10, having mpeg2dec occasionally tell us to output a frame that
was never decoded was just ignored, so do the same in 1.0

Fixes: #685107
2012-10-01 10:43:26 +10:00
Jan Schmidt
ddd13808b3 mpeg2dec: Hold ref to buffer while mapped
So that the buffer still exists when we go to unmap it later,
even if it got pushed in the meantime.
2012-09-11 23:16:45 -07:00
Edward Hervey
2cc06f7aaf mpeg2dec: Don't use NULL values for fbuf
We need to make a difference between the initial dummy buffers (which
have a fbuf->id of NULL) and the buffers on which we allocated
video frames.
2012-08-06 11:53:55 +02:00
Edward Hervey
707b14a2ef mpeg2dec: Avoid dropping first GOP
We use the mpeg2_fbuf_t id field as an integer and not as a pointer, so
do not check if it is NULL or not.

And cleanup a bit of debug
2012-07-26 18:30:04 +02:00
Wim Taymans
f0b0ffa1cf mpeg2dec: copy buffer flags when cropping
When we crop a buffer, copy the flags as well.
2012-07-23 13:32:26 +02:00
Robert Swain
5bc6b54185 mpeg2dec: Fix GstVideoInfo pointer 2012-07-23 11:28:51 +02:00
Robert Swain
870fe4e7ec mpeg2dec: Correctly flag output buffer interlaced state
If the sequence is not flagged as progressive its buffers are marked
interlace mode mixed. There is an individual picture flag indicating
whether picture in the sequence are interlaced or not. This is used
along with the new GST_VIDEO_BUFFER_FLAG_INTERLACED to correctly and
completely indicate the buffer's interlaced state.

Also, TFF and RFF should only be set if the sequence is not progressive.
2012-07-23 11:15:47 +02:00
Sebastian Dröge
a20ba81f9a ext: Update for video base classes API changes 2012-07-23 10:33:33 +02:00
Edward Hervey
89ff56321f mpeg2dec: Propagate GstFlowReturn where needed
It was just ignoring the return values...
2012-07-19 10:00:32 +02:00
Edward Hervey
e0a5d6de60 mpeg2dec: Store temporary buffers out of the way
When mpeg2dec needs to do cropping (because downstream can't handle it),
we need temporary buffers to decode to.

Use the user_data field to store those, and unify the rest of the code
that needs to touch a buffer (regardless of how/where it was allocated).

https://bugzilla.gnome.org/show_bug.cgi?id=680194
2012-07-19 10:00:32 +02:00
Edward Hervey
090e139048 mpeg2dec: Call gst_video_decoder_negotiate() 2012-07-18 18:33:23 +02:00
Wim Taymans
91ba1a2ebb fix for allocator API changes 2012-07-09 16:27:25 +02:00
Wim Taymans
ddd57f9107 update for query api changes 2012-07-06 11:27:27 +02:00
Sebastian Dröge
7c99d37ad6 mpeg2dec: Add comment explaining why we first chain up to the parent class' decide_allocation 2012-06-25 09:43:53 +02:00
Sebastian Dröge
a7aa984d67 mpeg2dec: Set allocation parameters to guarantee 16-byte aligned output buffers
Fixes bug #377713.
2012-06-25 09:34:53 +02:00
Wim Taymans
ca77ad4e05 mpeg2dec: fix compilation 2012-06-20 13:23:51 +02:00
Wim Taymans
e956902511 fix compilation 2012-06-20 10:39:24 +02:00
Sebastian Dröge
349eb6710e mpeg2dec: Port to 0.11 again 2012-06-20 09:06:37 +01:00