Commit graph

945 commits

Author SHA1 Message Date
Edward Hervey
f7893fb63e codecparsers: Actually store mpeg video bitrate value
And use the extension also (higher 12 bits)
2013-05-23 14:59:33 +02:00
Olivier Crête
d0524c0579 insertbin: Annotate callback scopes 2013-05-15 20:03:30 -04:00
Sebastian Dröge
275e104be6 egl: Add destroy notify instead of always calling eglTerminate() on the display
In some scenarios, for example in QtWebKit, might be difficult to obtain full
control on the egl display and it might be only accessible indirectly via
eglGetCurrentDisplay().

https://bugzilla.gnome.org/show_bug.cgi?id=700058
2013-05-10 12:50:05 +02:00
Josep Torra
db3d5f92d6 egl: Allow being used in C++ code 2013-05-10 11:48:46 +02:00
Thiago Santos
529b248a89 codecparsers: ensure the debug category is properly initialized
The user of the library might not need to create a NalParser, so
the debug category needs to be initialized from other functions
as well if required.
2013-05-07 21:05:10 -03:00
Louis-Francis Ratté-Boulianne
f0211e5b7b uridownloader: unlock mutex when switching urisrc state to NULL to avoid deadlock
When chain method was called after gst_uri_downloader_stop and before state has been changed to NULL, execution was blocking on g_mutex_lock.

Conflicts:
	gst-libs/gst/uridownloader/gsturidownloader.c
2013-05-07 20:02:41 -03:00
Thiago Santos
99efe87b5d uridownloader: properly unref the urisrc between downloads
This prevents leaking the element. Also sets the bus to flushing
to completely reset the downloader state
2013-05-07 20:02:41 -03:00
Andre Moreira Magalhaes (andrunko)
f72869816c uridownloader: make cancelled state 'permanent' until a reset
When downloading and cancelling quickly the uridownloader object and the
element using it could miss the cancelled window and the uridownloader
would fetch the wrong URI and block on subsequent fetches.

This was also problematic when stopping elements, while one task would
call the cancel, another element thread could issue a new fetch_uri. As
the cancel state isn't 'permanent' this fetch_uri would block and
prevent the whole element from stopping and going to NULL.

This patch makes the 'cancelled' state permanent until a
gst_uri_downloader_reset is called. This way the element knows the
window where the uridownloader isn't active and only reactivate it when
ready.
2013-05-07 20:02:41 -03:00
Thiago Santos
859635ca01 uridownloader: refactor gsturidownloader to its own lib
gsturidownloader can be reused by other plugins, better have it
into its own lib
2013-05-07 20:02:41 -03:00
Sreerenj Balachandran
0511a6b032 mpegvideometa: Fix typo in comment
https://bugzilla.gnome.org/show_bug.cgi?id=699827
2013-05-07 14:52:50 +02:00
Sebastian Dröge
5bc64fd579 egl: Use gst_context_writable_structure() 2013-04-18 16:11:26 +02:00
Josep Torra
5ba7f5effc egl: silence warnings building for RPI related to 'vcos_*' 2013-04-18 12:16:17 +02:00
Sebastian Dröge
a6e50140b7 egl: Use new types from libgstvideo instead of defining our own 2013-04-17 10:49:59 +02:00
Sebastian Dröge
524421e436 video: Remove video library from -bad
This only contained API that now has replacements in core and base.
2013-04-11 13:35:02 +02:00
Tim-Philipp Müller
3f228f3dfc docs: add since markers to new codecparsers video meta API
https://bugzilla.gnome.org/show_bug.cgi?id=691712
2013-04-02 23:34:19 +01:00
Sebastian Dröge
f7a00d8ca4 egl: Add a #define for the EGLImage memory caps feature 2013-04-01 10:22:06 +02:00
Edward Hervey
67ac84c7b5 codecparsers: Add Mpeg Video GstMeta
This can be used by parsers to provide pre-parsed information to
downstream elements that would require it (so they can avoid having
to parse the bitstream again).
2013-03-31 18:55:29 +02:00
Edward Hervey
3bb62cbf1d codecparser: Fix picture packet extension size check
It is at least 34 bit big (5 bytes with byte padding)
2013-03-31 12:18:32 +02:00
Sebastian Dröge
ce9b6e5afb eglglessink: Implement GstContext handling 2013-03-29 16:38:34 +01:00
Josep Torra
a9a385c512 egl: check on the proper display and indent some lines 2013-03-29 10:33:10 +01:00
Sebastian Dröge
c645e41711 egl: Add a boxed type for GstEGLDisplay 2013-03-28 16:53:35 +01:00
Sebastian Dröge
8f9c2e8e44 egl: Fix some return values in g_return_val_if_fail() 2013-03-19 14:32:30 +01:00
Sebastian Dröge
a373e75949 egl: Add support for different orientations of the EGLImage
The content of the EGLImages can be at least in GStreamer orientation,
meaning top line first in memory, or OpenGL orientation, meaning
bottom line first in memory.
2013-03-13 12:23:49 +01:00
Sebastian Dröge
5e948472ed egl: Rename gst_egl_image_memory_can_map() to is_mappable() 2013-03-03 12:31:05 +01:00
Sebastian Dröge
4ca26a3c45 egl: Remove buffer pool option
This should be done differently via the allocators in the allocation query.
2013-03-03 12:31:05 +01:00
Sebastian Dröge
a47f52bb96 egl: Mark memory as not mappable if it isn't 2013-03-03 12:31:05 +01:00
Sebastian Dröge
0a5ff713e7 egl: Implement sharing of memory 2013-03-03 12:31:05 +01:00
Sebastian Dröge
4dd09a12dd egl: Add infrastructure for EGLImage handling 2013-03-03 12:31:04 +01:00
Sebastian Dröge
4bf50b6af0 codecparsers: Use correct type specifiers for format strings to fix compiler warnings 2013-03-03 12:29:42 +01:00
Tim-Philipp Müller
f8139b2b99 insertbin: mark as unstable API 2013-02-14 09:03:28 +00:00
Tim-Philipp Müller
214d7e0619 insertbin: fix up gtk-doc chunk and add since markers 2013-02-14 09:02:53 +00:00
Tim-Philipp Müller
0dcb7c27ba glib-compat-private.h: remove old GStaticRecMutex stuff
Breaks the build with newer GLibs ("unknown type GStaticRecMutex")
and is not needed any more.
2013-02-12 10:39:44 +00:00
David Schleef
743098fe8c mpegvideoparser: increase min size for picture coding ext
This could use additional work.  The parsing code overruns the
end of buffers during normal operation, triggering GST_WARNINGs.
2013-02-11 18:02:23 -08:00
Youness Alaoui
381fcda68b basecamerabinsrc: Add auto-start property to basecamerabin 2013-02-11 22:04:59 +01:00
Gwenole Beauchesne
6e440f1da4 codecparsers: h264: add profile enums.
Add all useful profiles from AVC, MVC and SVC specifications.

https://bugzilla.gnome.org/show_bug.cgi?id=693140

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-02-07 14:38:27 +01:00
Gwenole Beauchesne
250555a7de codecparsers: mpeg2: add helpers to convert quantization matrices.
Add utility functions to convert quantization matrices from zigzag scan
order (as encoded in the bitstream) into raster scan order. Also provide
another function to reverse the operation.

https://bugzilla.gnome.org/show_bug.cgi?id=693000

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-02-06 14:22:41 +01:00
Cong Zhong
46c01de05d codecparsers: mpeg2: store quantization matrices in zigzag scan order.
Quantizer matrices are encoded in zigzag scan order in the bitstream,
but they are stored in raster scan order when they are parsed. However,
default matrices were also prepared in zigzag scan order, hence the
mismatch. i.e. the matrices were presented either in raster scan order
if they are explicitly present in the bitstream, or they were presented
in zigzag scan order if the default definitions were to be used instead.

One way to solve this problem is to always expose the quantization
matrices in zigzag scan order, since this is the role of the parser to
not build up stories from the source bitstream and just present what
is in there.

Utility functions will be provided to convert quantization matrices in
either scan order.

https://bugzilla.gnome.org/show_bug.cgi?id=693000

Signed-off-by: Cong Zhong <congx.zhong@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-02-06 14:22:41 +01:00
Tim-Philipp Müller
cf695c6da9 insertbin, tests: fix printf format compiler warnings 2013-01-25 12:25:15 +00:00
Gwenole Beauchesne
10639eb889 codecparsers: vc1: fix bitplanes decoding (DIFF6 or NORM6 residual bytes).
Fix parsing of residual bytes. This is a two-step process. First,
remaining colums of full vertical resolution (<height>) need to be
processed. Next, remaining bytes in the first row can be processed,
while taking into account the fact that we may have filled in the
first columns already. So, this is not full horizontal resolution.

The following figure helps in understanding the expected order of
operations, for a 8x5 MBs bitplane.

    5 5 6 6 6 6 6 6
    5 5 1 1 1 2 2 2
    5 5 1 1 1 2 2 2
    5 5 3 3 3 4 4 4
    5 5 3 3 3 4 4 4

So, after tiles 1 to 4 are decoded, vertical tile 5 needs to be
processed (2x5 MBs) and then the horizontal tile 6 (6x1 MBs).

https://bugzilla.gnome.org/show_bug.cgi?id=692461

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-25 09:53:05 +01:00
Gwenole Beauchesne
fa2a526f04 codecparsers: vc1: fix bitplanes decoding (DIFF6 or NORM6).
Fix decoding of DIFF6 or NORM6 bitplanes with an odd number of lines
(3x2 "horizontal" tiles). In this case, we have to skip the first line
of macroblocks but <width> number of bytes was used to do so, instead
of the actual <stride> size.

This fixes decoding for the video sample attached to:
https://bugzilla.gnome.org/show_bug.cgi?id=668565

https://bugzilla.gnome.org/show_bug.cgi?id=692461

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-25 09:39:01 +01:00
Olivier Crête
d1023646f9 insertbin: Add bin to dynamically insert elements in a running pipeline
This element automatically links in any element added using it's
action signals. These elements must have a single source pad and a single
sink pad.
2013-01-23 21:13:03 -05:00
Gwenole Beauchesne
07a51b16eb codecparsers: vc1: add API to parse slice headers.
Add gst_vc1_parse_slice_header() function to parse slice headers as
described in 7.1.2. Slice layers are optional and allowed in advanced
profile mode only. Picture header, if available (PIC_HEADER_FLAG),
is parsed but not recorded because it shall be the same as that was
previously parsed with gst_vc1_parse_frame_header().

This fixes SA00049.vc1 conformance test.

https://bugzilla.gnome.org/show_bug.cgi?id=692388

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-23 17:22:07 +01:00
Gwenole Beauchesne
82200d75ae codecparsers: vc1: fix bitplanes decoding.
Fix decoding of DIFF2 or NORM2 bitplanes with an odd number of macroblocks.
In particular, account for the first bit that was already parsed so that to
avoid a buffer overflow after all pairs are parsed.

This fixes SA00040.vc1 conformance test.

https://bugzilla.gnome.org/show_bug.cgi?id=692312

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-23 09:35:11 +01:00
Gwenole Beauchesne
cbec9bfcd0 codecparsers: vc1: simplify GstVC1VopDquant structure.
Rename dqsbedge to dqbedge. The intent is that we can only have a single
boundary edge selector, depending on the value of dqprofile. So, dqbedge
represents DQSBEDGE if dqprofile == GST_VC1_DQPROFILE_SINGLE_EDGE, or
DQDBEDGE if dqprofile == GST_VC1_DQPROFILE_DOUBLE_EDGE.

The former dqbedge field is marked as unused and can be removed on the
next gst-plugins-bad version that allows ABI changes.

https://bugzilla.gnome.org/show_bug.cgi?id=692272

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-22 14:22:30 +01:00
Gwenole Beauchesne
93fbcfda23 codecparsers: vc1: fix VOPDQUANT parser for DQUANT == 2.
Fix parsing of VOPDQUANT when DQUANT == 2. In particular, DQUANTFRM is
not present in the bitstream in this case and it shall be derived to
the default value of zero (7.1.1.31.1).

https://bugzilla.gnome.org/show_bug.cgi?id=692271

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-22 11:20:06 +01:00
Gwenole Beauchesne
73213e273f codecparsers: vc1: fix calculation of ALTPQUANT.
Fix calculation of ALTPQUANT when DQUANT == 1. PQDIFF alters ALTPQUANT
in any case. See 7.1.1.31.6.

https://bugzilla.gnome.org/show_bug.cgi?id=692270

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-22 11:19:56 +01:00
Gwenole Beauchesne
f3698c6289 codecparsers: vc1: fix parser for DQPROFILE in VOPDQUANT.
Fix parse_vopdquant() to correctly parse DQPROFILE, which is 2 bits
instead of a single bit.

https://bugzilla.gnome.org/show_bug.cgi?id=692267

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-22 11:19:44 +01:00
Gwenole Beauchesne
56e2405a35 codecparsers: h264: add inferred value for slice_beta_offset_div2.
The standard specifies that when slice_beta_offset_div2 is not present
in the slice header, then the value of slice_beta_offset_div2 shall be
inferred to be equal to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=692265

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-22 11:19:17 +01:00
Mark Nauwelaerts
c20d13d8f8 codecparsers: h264: zero-initialize SPS VUI parameters
... so all 'present' flags indicate no presence of optional parts
in case VUI parameters end up not being parsed.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681818
2013-01-15 19:44:06 +01:00
Youness Alaoui
faf7370a27 GstPhotography: Add new enum values to match android's parameters
https://bugzilla.gnome.org/show_bug.cgi?id=688486
2012-11-20 09:37:59 +00:00