Commit graph

409 commits

Author SHA1 Message Date
Sebastian Dröge
55043aff12 h264parse: Fix indentation 2016-11-26 12:16:58 +02:00
Sebastian Dröge
cb4ccecc97 h265parse: Fix assertion when encountering an invalid NALU
Error out properly instead.

https://bugzilla.gnome.org/show_bug.cgi?id=775130
2016-11-26 12:16:58 +02:00
Sebastian Dröge
47bf425cba h264parse: Fix assertion when encountering an invalid NALU
Error out properly instead.

https://bugzilla.gnome.org/show_bug.cgi?id=775130
2016-11-26 12:16:58 +02:00
Sebastian Dröge
43736e5c37 h265parse: Ensure codec_data has the required size when reading number of NAL arrays
https://bugzilla.gnome.org/show_bug.cgi?id=774896
2016-11-23 10:53:46 +02:00
Sebastian Dröge
1dbfef93d6 h264parse: Ensure codec_data has the required size when reading number of SPS
https://bugzilla.gnome.org/show_bug.cgi?id=774896
2016-11-23 10:53:40 +02:00
Sebastian Dröge
0f657cec07 vc1parse: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:22:44 +02:00
Nirbheek Chauhan
bb0a83b018 plugins: Use explicit type conversion from enums
MSVC warns about this because it's a C++ compiler, and this actually
results in useful things such as the incorrect 'gboolean' return value
for functions that return GstFlowReturn, so let's do explicit
conversions to reduce the noise and increase its efficacy.
2016-10-27 23:06:26 +05:30
Kyungyong Kim
214a041e13 h265parse: Fix parsing of multiple NALs in the hvcC box
https://bugzilla.gnome.org/show_bug.cgi?id=771970
2016-09-26 09:35:25 +03:00
Sebastian Dröge
8daf628910 jpeg2000parse: Don't pass NULL strings to the colorspace / sampling parsing functions
They assert on NULL.
2016-09-24 10:05:49 -04:00
Nirbheek Chauhan
42af2d66d8 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.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:35:54 +01:00
Sreerenj Balachandran
14cc51cddc videoparsers: h264: Add more scalable profiles to the profile list
Adding Scalable Constrained High (G.10.1.2.1) and
Scalable High Intra(G.10.1.3) profiles to the profile list

https://bugzilla.gnome.org/show_bug.cgi?id=769303
2016-08-02 14:26:40 +03:00
Sebastian Dröge
064f46e9e1 jpeg2000parse: Use correct enum type
GST_JPEG2000_SAMPLING_RGB instead of GST_JPEG2000_COLORSPACE_RGB

https://bugzilla.gnome.org/show_bug.cgi?id=768696
2016-07-12 00:02:53 +03:00
Luis de Bethencourt
418e643b61 gstjpeg2000parse: no need for else after a goto
else clause is redundant when the end of the if statement is a jump.
If we haven't gone to the beach, we are in the false branch.
2016-07-01 14:08:13 +01:00
Aaron Boxer
154698389d gstjpeg2000parse: improved parsing of jpc magic and j2c box
https://bugzilla.gnome.org/show_bug.cgi?id=767512
2016-07-01 13:15:11 +01:00
Edward Hervey
c19d1b46c3 h264parse: Drop filler data
When skipping data, check if they are filler bytes. If so, drop the
data instead of skipping. We don't want to output filler bytes, but they
shouldn't cause a discontinuity.

https://bugzilla.gnome.org/show_bug.cgi?id=768125
2016-06-30 10:32:01 +02:00
Jan Schmidt
92e7e3a3bf h264parse: When input alignment=AU, always drain each packet.
If the input alignment claims AU alignment, each received
buffer should contain a complete video frame, so never hold over parts
of buffers for later processing. Also reduces latency, as packets
are parsed/converted and output immediately instead of 1 buffer
later.

Fixes a problem where an (arguably disallowed) padding byte on the
end of a buffer is detected as an extra byte in the following
start code, and messes up the timestamping that should apply to
that start code.
2016-06-24 22:55:18 +10:00
Tim-Philipp Müller
cb7b6e7a90 videoparsers: fix broken include 2016-06-24 09:39:00 +01:00
Aaron Boxer
e7e6a3579d jpeg2000parse: use enums for colorspace and sampling, rather than strings
Also, move gstjpeg2000sampling to codecparsers project

https://bugzilla.gnome.org/show_bug.cgi?id=767908
2016-06-24 11:23:31 +03:00
Aaron Boxer
81e3b998be jpeg2000parse: support j2c format
https://bugzilla.gnome.org/show_bug.cgi?id=767512
2016-06-17 23:08:37 +03:00
Mats Lindestam
a0876aa750 h264parse: support for handling of config-interval = -1
Added support for handling of config-interval = -1.
config-inteval = -1 represents resending SPS and PPS for each
I-/IDR-frame.

https://bugzilla.gnome.org/show_bug.cgi?id=766803
2016-06-13 10:10:21 +01:00
Mats Lindestam
bf0d952387 h264parse: refactored handling of SPS/PPS when pushing frames
https://bugzilla.gnome.org/show_bug.cgi?id=766803
2016-06-13 10:10:05 +01:00
Mats Lindestam
0c04e004bb h264parse: change "config-interval" property type from uint to int
So we can use -1 as special value like in rtph264pay.

https://bugzilla.gnome.org/show_bug.cgi?id=766803
2016-06-13 10:08:22 +01:00
Aaron Boxer
3dc3a915ea jpeg2000parse: Require either colorspace or sampling field in sink caps
And always set the sampling field on the src caps, if necessary guessing a
correct value for it from the colorspace field.

Also, did some cleanup: removed sampling enum - redundant.

https://bugzilla.gnome.org/show_bug.cgi?id=766236
2016-06-10 16:25:50 +03:00
Aaron Boxer
fffee978c2 jpeg2000parse: Add JPEG2000 parser element
https://bugzilla.gnome.org/show_bug.cgi?id=766236
2016-06-07 15:29:41 +03:00
Aaron Boxer
eebb65e934 openjpeg: set sampling in the caps
https://bugzilla.gnome.org/show_bug.cgi?id=766236
2016-06-07 15:24:32 +03:00
Scott D Phillips
3edd641667 h265parse: Don't assume contiguous id's in make_codec_data
vps/sps/pps id's are not required to be used contiguously.

https://bugzilla.gnome.org/show_bug.cgi?id=766891
2016-05-30 12:42:24 +03:00
Sebastian Dröge
920ad27122 h265parse: H265 level idc 0 is not valid
Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538
2016-04-25 18:50:59 +03:00
Sebastian Dröge
4bdda1d810 h264parse: H264 level idc 0 is not valid
Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538
2016-04-25 18:50:59 +03:00
Sebastian Dröge
0fa43aaab4 h264parse: constrained-baseline is a subset of baseline
We get into this code path if the profile is already constrained-baseline and
downstream does not support constrained-baseline. So we should try baseline
and the other compatible profiles.

https://bugzilla.gnome.org/show_bug.cgi?id=764448
2016-04-01 12:08:29 +03:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Aleksander Wabik
d8e681bb63 h264parse, h265parse: fix handling of downstream force-key-unit events
The parser handles the downstream force-key-unit event incorrectly,
it tries to parse it as an upstream force-key-unit event, does not
check the return value, and then uses uninitialized memory in
"all_headers" boolean variable.

https://bugzilla.gnome.org/show_bug.cgi?id=763793
2016-03-17 19:24:32 +00:00
Sreerenj Balachandran
92f4eb45ab videoparsers: h265: Fix segfault while transforming hevc to nal aligned bytestream
Create temporary ParseFrame and copy the nal size buffer region
for each nal unit like we did for h264.

https://bugzilla.gnome.org/show_bug.cgi?id=763494
2016-03-11 17:34:03 +02:00
Edward Hervey
5ebf1d477d mpegvideoparser: Handle non-hierarchical profiles again
This is a regression from since mpegvideoparser was switched to
use the codecparsing library.

The problem is that the high bit of the profile_and_level is used
to specify non-hierarchical profiles and levels. Unfortunately we
were discarding that information.

Expose that escape bit, and use it in the element

https://bugzilla.gnome.org/show_bug.cgi?id=763220
2016-03-09 15:18:42 +01:00
Sreerenj Balachandran
cf7056a312 videoparsers: h264: Disable passthorugh mode enabling
Enabling passthorugh mode is causing multiple issue:
For nal aligned multiresoluton streams, passthrough mode
make h264parse unable to advertise the new resoultions.
Also causing issues while parsing MVC streams which have two
separate layers (base-view and non-base-view).

This fix is only a temporary workaround.

For MVC, proper fixes needed in many places:
(handle prefix nal unit, handle non-base-view slice nal extension,
fix the picture_start detection for multi-layer-mvc streams etc)

https://bugzilla.gnome.org/show_bug.cgi?id=758656
2016-02-29 12:35:58 +02:00
Luis de Bethencourt
63af4649c6 h264parse: remove unused mview_mode value
Since commit b77f8e172a the new value
assigned to mview_mode hasn't been used. That commit changed the following
"if" check to an "else if", which means the original value of mview_mode
is used.
2016-02-04 12:50:47 +00:00
Matthew Waters
2a49811721 h265parse: avoid sending unnecessary downstream caps queries/events
h265 versions of the following commits:
f352691a04
try the current caps before querying downstream
72bc7d7f73
increase caps equality check for no codec_data

https://bugzilla.gnome.org/show_bug.cgi?id=761014
2016-02-04 18:19:40 +11:00
Matthew Waters
72bc7d7f73 h264parse: increase caps equality check for no codec_data
When converting from avc to byte-stream, there will not be any codec_data
in the src caps.  Remove it before the equality check to avoid sending caps
events downstream on every SPS/PPS change.

https://bugzilla.gnome.org/show_bug.cgi?id=761014
2016-02-04 18:07:57 +11:00
Matthew Waters
f352691a04 h264parse: try the current caps before querying downstream
If we have a stream that contains an unchanging SPS/PPS for every video frame,
we don't need to to constantly query downstream for it's supported caps if the
current caps are compatible with the negotiated caps.

https://bugzilla.gnome.org/show_bug.cgi?id=761014
2016-02-04 18:07:47 +11:00
Vineeth TM
e389211aa5 h265parse: Fix buffer leak when sps is not present
When sps data is NULL, the buffer allocated and mapped is not being freed.
In this scenario there is no need to allocate the buffer as we are supposed to return NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=761070
2016-01-25 10:07:55 -03:00
Vineeth TM
6a35a4018e h265parse: Fix buffer memory leak.
While setting caps, codec_data buffer is mapped, but not being unmapped
leading to memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=761070
2016-01-25 10:07:55 -03:00
Dave Craig
88d7beb921 videoparsers: Check for NULL return value of gst_pad_get_current_caps()
https://bugzilla.gnome.org/show_bug.cgi?id=759503
2015-12-16 10:08:43 +01:00
Vineeth TM
7c42ba97d7 plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2015-12-15 10:30:49 +00:00
Nicolas Dufresne
fe116092cd h26xparse: Resend PPS/SPS after seek
This is to support byte-stream decoder that does not remember the
PPS/SPS after a flush. This is not needed by all decoders, but is
harmless for those that do remember.

https://bugzilla.gnome.org/show_bug.cgi?id=758405
2015-12-05 19:05:26 -05:00
Luis de Bethencourt
c8d4e85f9e vc1parse: add break to switch case
Even though all cases inside VC1_STREAM_FORMAT_ASF are goto or
g_assert_not_reached(), add a break at the end to appease Coverity.

CID #1320706
2015-09-29 13:34:15 +01:00
Nicolas Dufresne
b392a6e3b9 h264parse/h265parse: Fix negotiation crash
As it's recursive, gst_pad_get_allowed_caps() may also return
empty for anything incompatible downstream. EMPTY is not valid caps
value for gst_caps_fixate(). This lead to assertion and then crash.
Ideally, the negotiate function should be re-factored to have a return
value, and we could make the negotiation fails earlier.

https://bugzilla.gnome.org/show_bug.cgi?id=754122
2015-08-26 10:56:07 -04:00
Olivier Crête
567b1e8c46 videoparsers: Use gst_base_parse_merge_tags()
Instead of squashing all upstream tags

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 17:28:29 +01:00
Jan Schmidt
fdac09d843 h264parse: Clear SPS info after processing.
The SPS struct might be filled out by a call to
gst_h264_parser_parse_subset_sps, which fills out
dynamically allocated data and requires a call
to gst_h264_sps_clear() to free it. Also make sure
to clear out any allocated SPS data when returning
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=753306
2015-08-15 15:39:23 +10:00
Thiago Santos
8f855a8b78 pngparse: enable accept-intersect and accept-template flags on sinkpad
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:59 -03:00
Thiago Santos
c4cd1ce4fd videoparsers: enable accept-template flag
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:59 -03:00
Sreerenj Balachandran
a83dabd5e8 videoparsers: h265: Fix the frame start detection code
Check slice headers in between GST_H265_NAL_SLICE_TRAIL_N
and GST_H265_NAL_SLICE_RASL_R for frame start detection.

https://bugzilla.gnome.org/show_bug.cgi?id=753497
2015-08-11 11:34:36 +01:00