Commit graph

468 commits

Author SHA1 Message Date
Sebastian Dröge
e2bde252a6 encoding-profile: Recurse into nested container profiles and only add the final audio/video streams
If we e.g. have AVI with DV container with video/audio inside the DV
container, we can't handle this at this point with an encoding profile.
Instead of erroring out, flatten the container hierarchy.

https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Sebastian Dröge
4c2e7ae051 encoding-profile: Fail to create encoding profile from discoverer info if no streams could be added
https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Sebastian Dröge
436adc68e0 encoding-profile: Move adding of each stream to a helper function
https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Sebastian Dröge
155222017a codec-utils: 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 16:49:20 +03:00
Sebastian Dröge
7741e56db4 codec-utils: 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 16:49:20 +03:00
Sebastian Dröge
fc99a61774 encoding-profile: Remove codec_data and streamheader fields from constraint caps
When converting discoverer output to an encoding profile, it makes sense to
omit these. It's very very unlikely that our encoder is going to produce bit
by bit the same codec_data or streamheader.

https://bugzilla.gnome.org/show_bug.cgi?id=765534
2016-04-25 16:07:50 +03:00
Sebastian Dröge
fd32d5812a encoding-profile: Don't put G_BEGIN_DECLS around #include statements
It should only be around our own declarations.
2016-04-25 15:06:23 +03:00
Tim-Philipp Müller
2102fdc983 discoverer: copy over result and seekable fields when copying a discoverer info
The function gst_discoverer_info_copy doesn't copy the data members seekable
and result of the source GstDiscovererInfo.

In the case of copying a GstDiscovererInfo for later use, the seekbale will be
undefined, which in practice usually will be false, even though the seekable of
the original GstDiscovererInfo is true.

https://bugzilla.gnome.org/show_bug.cgi?id=762710
2016-04-02 10:09:46 +01:00
Jimmy Ohn
65f721b326 codec-utils: Add utilities for AAC and the AACHead header
Add utilities about the channels and sample rate for AAC.

https://bugzilla.gnome.org/show_bug.cgi?id=749110
2016-03-24 14:27:21 +02:00
Víctor Manuel Jáquez Leal
327d617d39 install-plugins: update documentation
Use gst-inspect-1.0 instead of gst-inspect-0.10

https://bugzilla.gnome.org/show_bug.cgi?id=763316
2016-03-24 10:29:27 +02:00
Lim Siew Hoon
5ae5f9055f pbutils: docs: Remove the empty lines in between <refsect2> and </refsect2>
They are converted into <para></para> by gtk-doc...

https://bugzilla.gnome.org/show_bug.cgi?id=762674
2016-02-26 14:46:44 +02:00
Sebastian Dröge
87f380867b audiovisualizer: Let GstAudioVisualizerShader enum GType be autogenerated by glib-mkenums
That happens automatically already anyway.
2016-02-25 20:40:02 +02:00
Luis de Bethencourt
e23b12b1c9 visual: correct type name
Base class type name should not reference libvisual since not all child
elements use this. This was an oversight when merging audiovisualizers into
a common base class.
2016-02-25 10:51:50 +00:00
Sebastian Dröge
43655580e7 encoding-profile: Check for FALSE'ness directly, not by comparing with FALSE 2015-12-29 17:56:21 +02:00
Sebastian Dröge
f31240a765 encoding-profile: Don't use preset_name string after free
When we run the loop for another time and do not have a preset name, we would
try to print the preset name of a previous iteration that is already freed.

Also move some other variables into the block where they are actually used
to prevent similar mistakes in the future.

CID 1346536
2015-12-29 17:55:23 +02:00
Sebastian Dröge
7fddeaa878 pbutils: Link to libgstbase for bytewriter and adapter 2015-12-24 13:59:52 +01:00
Thibault Saunier
512ac3ea72 encodebin: Implement an encoding profile serialization format
https://bugzilla.gnome.org/show_bug.cgi?id=759356
2015-12-24 09:52:53 +01:00
Xavier Claessens
429860e51f base: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 13:39:43 -05:00
Reynaldo H. Verdejo Pinochet
4ed7b0a0e6 Drop usage of deprecated g-ir-scanner --strip-prefix flag 2015-12-02 20:19:43 -08:00
Edward Hervey
f9b9472ad4 discoverer: Also consider XSUB as a subtitle format 2015-12-02 16:37:50 +01:00
Edward Hervey
817c780380 pbutils: Add description for XSUB subpicture format 2015-12-02 16:37:50 +01:00
Luis de Bethencourt
2a70c86e85 codec-utils: accept wrong version field in OpusHead header
Some Opus files found on the wild have 0 in the version field of the
OpusHead header, instead of the correct value of 1. The files still
play, don't make this error fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=758754
2015-12-01 15:47:35 +00:00
Reynaldo H. Verdejo Pinochet
0c95b0a738 Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-17 14:50:27 -08:00
Luis de Bethencourt
09c881ee14 codec-utils: guint8 can't hold value over 255
channels is a guint8, so the max value is 255 and checking if it value is
> 256 will never be false.

CID 1338687, CID 1338688
2015-11-12 14:39:22 +00:00
Vineeth TM
3f099e3c29 pbutils:encoding-target: Fix string memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=757926
2015-11-11 15:40:52 +01:00
Thibault Saunier
629b63d1f2 discoverer: Check API arguments and assert if needed 2015-11-07 00:46:47 +01:00
Sebastian Dröge
bcd7b2fff2 codec-utils: Add utilities for Opus caps and the OpusHead header
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:33 +02:00
Thibault Saunier
a7123ebb58 encoding-profile: Do not force user to provide an encoding profile name
And use the profile called `default` if none provided.
2015-11-02 11:35:55 +01:00
Thibault Saunier
83fa06aab5 encoding-target: Do not unconditionally break when searching for a target
Otherwise the loop is useless!

Fixes CID 1338051
2015-11-02 11:31:34 +01:00
Thibault Saunier
2e20f3ba4f encoding-target: Add a GST_ENCODING_TARGET_PATH envvar to find target files 2015-10-28 16:07:44 +01:00
Thibault Saunier
96f69fa998 encoding-target: Allow having encoding target without a category set
There was already some code to handle that, but the support was not
complete in those code paths.
2015-10-28 16:07:44 +01:00
Thibault Saunier
0256381f6f encoding-target: Create directory before trying to save encoding targets 2015-10-28 16:07:44 +01:00
Thibault Saunier
db272cf9cb encoding-profile: Allow specifying the target category in the serialized encoding target 2015-10-28 16:07:44 +01:00
Luis de Bethencourt
e90464d2f9 visual: make private all variable subclasses don't need
Subclasses don't need access to all variables. Making them private.

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-10-01 16:05:58 +01:00
Luis de Bethencourt
8ae0fd3990 visual: merge audiovisalizer base classes
Move the audiovisualizer base class to pbutils, so it can be used by plugins
from other modules

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-10-01 16:05:58 +01:00
Vineeth TM
fd7724b6e1 pbutils: discoverer: Set GError when NULL info is being returned.
When discovering the URI, if info is NULL, then instead of just returning NULL,
set the GError, so the error can be printed and notified.

https://bugzilla.gnome.org/show_bug.cgi?id=753701
2015-08-18 12:13:41 +03:00
Thibault Saunier
70363766cd discoverer: Fix a wrong naming in the documentation
gst_discoverer_stream_get_missing_elements_installer_details does not
exist, one should use gst_discoverer_info_get_missing_elements_installer_details
2015-06-17 10:16:47 +02:00
Nicolas Dufresne
c101452a4a gi: Use INTROSPECTION_INIT for --add-init-section
This new define was added to common. The new init section fixed
compilation warning found in the init line that was spread across
all files.
2015-06-16 18:04:57 -04:00
Mathieu Duponchelle
decea41ac7 discoverer: Serialize the top level DiscovererInfo
Which contains fields such as duration, uri and tags.

https://bugzilla.gnome.org/show_bug.cgi?id=749673
2015-06-04 19:16:40 +02:00
Sebastian Dröge
b3b2251c59 codec-utils: Add AAC channel configurations 11, 12 and 14 and levels 6 and 7 2015-06-04 16:31:12 +02:00
Tim-Philipp Müller
c0f55ecf4d pbutils: add description for video/x-cavs caps
https://bugzilla.gnome.org/show_bug.cgi?id=727731
2015-06-02 12:47:50 +01:00
Thibault Saunier
dcfb8a83a5 encodebin: Add a way to enable/disabled a GstEncodingProfile
Summary:
So that the user can easily use the same encoding profile to render
with/without audio/video stream.

API:
  gst_encoding_profile_is_disabled
  gst_encoding_pofile_set_enabled

https://bugzilla.gnome.org/show_bug.cgi?id=749056
2015-06-01 10:22:31 +02:00
Tim-Philipp Müller
a24b9cd5c2 discoverer: don't crash on unknown info types when deserializing
Handle unknown info types when deserializing instead of
dereferencing NULL pointers.

Coverity CID 1302394
2015-05-29 15:30:41 +01:00
Mathieu Duponchelle
7048ecdc49 gstdiscoverer: Add since annotation.
Forgot to add the since annotation to the
GstDiscovererSerializeFlags in the previous commit.
2015-05-19 18:53:09 +02:00
Mathieu Duponchelle
2e423dd129 discoverer: Add serialization methods.
[API] gst_discoverer_info_to_variant
[API] gst_discoverer_info_from_variant
[API] GstDiscovererSerializeFlags

+ Serializes as a GVariant
+ Adds a test
+ Does not serialize potential GstToc (s)

https://bugzilla.gnome.org/show_bug.cgi?id=748814
2015-05-19 18:48:07 +02:00
Sreerenj Balachandran
6af56187e8 pbutils: Use more strict profile checking for hevc
Use the profile_idc value to set the profile string in caps.
Don't use compatibility flags for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-30 21:42:34 +02:00
Tim-Philipp Müller
c680e324bc Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Guillaume Desmottes
d7d8fc5652 discoverer: fix GstToc leak when parsing toc messages
gst_message_parse_toc() returns a reffed GstToc which is owned by the
GstDiscovererInfo. But we have to make sure we unref its previous value before
setting the new one.

https://bugzilla.gnome.org/show_bug.cgi?id=747103
2015-04-17 14:49:01 +01:00
Edward Hervey
3eb35c77cc introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:21:43 +02:00
Olivier Crête
6046421ecc pbutils: description: Make static strings static
Otherwise, they're not guaranteed to still be valid when leaving the scope.

https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-27 15:08:50 -05:00
Tim-Philipp Müller
f0f6bd4910 pbutils: description: fix MPEG-2 video profiles in description
We would accidentally use the profile nick as profile name
in the description for MPEG video that's not version 4.
2015-02-18 11:34:15 +00:00
Sebastian Dröge
11c126363f Revert "codec-utils: Handle the two rext profiles for h265"
This reverts commit 19b9356680.

These two "profiles" are actually a complete set of profiles, which we will
need to handle separately. Unfortunately it seems like we need information
from the SPS to detect the exact profile.
2015-02-16 09:48:03 +02:00
Tim-Philipp Müller
6af7b70162 pbutils: description: move some code into utility function 2015-02-15 20:08:36 +00:00
Tim-Philipp Müller
4e1a43d4ea pbutils: descriptions: add H.265 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 20:05:28 +00:00
Tim-Philipp Müller
58d19cb7ca pbutils: descriptions: add MPEG-4 video profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 19:03:58 +00:00
Tim-Philipp Müller
001bd78957 pbutils: descriptions: add Dirac/VC-2 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 18:50:48 +00:00
Tim-Philipp Müller
1d528459be pbutils: descriptions: add H.264 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 18:50:43 +00:00
Tim-Philipp Müller
0aa81614ac install-plugins: fix indentation and add Since marker
Forgot to squash this into the actual patch before pushing.
2015-02-13 22:56:50 +00:00
Kalev Lember
4d8f52eeef install-plugins: Add API to suppress confirmation before searching
The new gst_install_plugins_context_set_confirm_search() API can be used
to pass a hint to modify the behaviour of the external installer
process.

https://bugzilla.gnome.org/show_bug.cgi?id=744465
2015-02-13 22:45:29 +00:00
Kalev Lember
538dc374c6 install-plugins: Add API for passing desktop ID and startup ID
The new gst_install_plugins_context_set_desktop_id() and
gst_install_plugins_context_set_startup_notification_id() API can be
used to pass extra details to the external installer process.

https://bugzilla.gnome.org/show_bug.cgi?id=744465
2015-02-13 22:43:46 +00:00
Sebastian Dröge
19b9356680 codec-utils: Handle the two rext profiles for h265
These values are for now taken from x265 and need to be checked against
the spec. Especially we need to check if information from other fields
need to be taken into consideration too, e.g. the bit depth and chroma
index from the SPS.

This however makes 4:4:4 output of x265enc actually work.
2015-02-11 17:53:49 +02:00
Sam Thursfield
651fa00c12 Fix documentation that incorrectly says a return value should be freed
The gst_discoverer_info_get_missing_elements_installer_details()
documentation and annotation says that the return value should be freed
with g_strfreev(), but actually it's owned by the GstDiscovereInfo
object and should definitely not get freed by the caller as well.

https://bugzilla.gnome.org/show_bug.cgi?id=742006
2014-12-27 13:02:14 +00:00
Thibault Saunier
72c05d1cbb encodebin: Add a way to disable caps renegotiation for output stream format
In some cases, the user might want the stream outputted by encodebin to
be in the exact same format during all the stream. We should let the
user specify when this is the case. This commit add some API in the
GstEncodingProfile to determine whether the format can be renegotiated
after the encoding started or not.

API:
    gst_encoding_profile_set_allow_dynamic_output
    gst_encoding_profile_get_allow_dynamic_output

https://bugzilla.gnome.org/show_bug.cgi?id=740214
2014-11-28 16:56:32 +01:00
Andrei Sarakeev
274d8066ce discoverer: fix typo in header file
https://bugzilla.gnome.org/show_bug.cgi?id=740675
2014-11-25 09:17:58 +00:00
Tim-Philipp Müller
2c649370ce pbutils: add description for audio/x-audible 2014-11-25 09:08:18 +00:00
Tim-Philipp Müller
f73dee34e7 pbutils: add description for Apple Core Audio Format
https://bugzilla.gnome.org/show_bug.cgi?id=739840
2014-11-09 14:44:36 +00:00
Olivier Crête
57ac7b1800 pbutils: Rename clock-base/seqnum-base to timestamp-offset/seqnum-offset
To match how they were renamed elsewhere.
2014-10-10 17:33:00 -04:00
Thibault Saunier
dcf8c3e8b0 discoverer: Set 'processing = FALSE' when done discovering SYNC
This avoids a race where we would get new tag but we are already
prerolled and analyzing results.

It is the way it is supposed to be handled as stated in comment:
"If preroll is complete, drop these tags - the collected information is
possibly already being processed and adding more tags would be racy"
2014-08-15 13:40:17 +02:00
Thibault Saunier
235e462077 pbutils: discoverer: Always set the pipeline back to NULL after an error
Otherwize the pipeline would be in an wrong state and on the next
iteration any kind of error could happen

Everytime an error happens in a pipeline the application has to set the
pipeline back to NULL instead of READY.

https://bugzilla.gnome.org/show_bug.cgi?id=733976
2014-07-30 15:28:21 +02:00
Tim-Philipp Müller
3f45b49dde pbutils: fix missing plugin description for missing elements
CID: 1226445
2014-07-21 00:17:38 +01:00
Nirbheek Chauhan
3715d7ae80 encoding-profile: Add example for using encoder presets with profiles
https://bugzilla.gnome.org/show_bug.cgi?id=733349
2014-07-18 14:01:10 +02:00
Nirbheek Chauhan
95b01ed588 encoding-profile: Fix typos and old API in docs
https://bugzilla.gnome.org/show_bug.cgi?id=733349
2014-07-18 14:01:10 +02:00
Evan Nemerson
7b791749a0 docs: Assorted documentation and introspection fixes for new 1.4 API
https://bugzilla.gnome.org/show_bug.cgi?id=732595
2014-07-02 09:09:44 +02:00
Gwenole Beauchesne
83e6daf3ef pbutils: handle more H.264 profiles and levels.
Recognize H.264 Level 5.2, as exposed by modern 2160p30+ streams,
i.e. commonly known as 4K. Also add initial support for handling
Annex.G (SVC) profiles.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-26 14:17:21 +02:00
Thibault Saunier
622007e7db discoverer: Add APIs to simply get installer details for missing plugins
Currently the API is far from optimal and the user has to work around
our badly defined API to simply install missing plugins.

API:
  new:
    gst_discoverer_info_get_missing_elements_installer_details

  deprecated:
    gst_discoverer_info_get_misc
    gst_discoverer_stream_info_get_misc

https://bugzilla.gnome.org/show_bug.cgi?id=720596
2014-05-03 21:48:55 +02:00
Sebastian Dröge
dce51830f4 encoding-profile: Free preset name in finalize 2014-04-15 13:48:17 +02:00
Tim-Philipp Müller
374e756eee pbutils: descriptions: default to systemstream=false for partial video/mpeg caps
Assume systemstream=false for video/mpeg caps where that field
is missing.
2014-04-10 12:30:50 +01:00
Tim-Philipp Müller
26a57f9a89 discoverer: minor docs fix
Can use a custom main context as well if needed.
2014-01-18 15:01:58 +00:00
Sebastian Dröge
5bf2a44496 encoding-profile: Fix typo in the docs 2014-01-13 15:32:38 +01:00
Stefan Sauer
86e6f10781 typefind: add support of BWF RF64 a 64bit wav variant
Detect and describe the RF64 Broadcast Wave Format.
Fixes #519220
2014-01-05 23:35:52 +01:00
Edward Hervey
b08598da1c encoding-profile: Add missing break statement
And do a minor cleanup

COVERITY CID 1139753
2013-12-30 17:30:15 +01:00
Stefan Sauer
51038d70aa pbutils: add typefinder and descriptions for audio/x-xi
xi files can be read by libsndfile.
2013-12-17 18:06:12 +01:00
Stefan Sauer
e09253724b descriptions: longer version of two audio codec descriptions 2013-12-17 18:06:11 +01:00
Stefan Sauer
c07af869a7 discoverer: also filter 'framed' field when looking for same streams
Fixes extra streams for some mp4 files containing aac audio.
2013-10-15 11:17:56 +02:00
Thibault Saunier
4305e1c33e encodebin: Handle changes in encoding_profile::restriction during playback
There are cases where we want to change the restrictions caps during
playback, handle that in encodebin.

https://bugzilla.gnome.org/show_bug.cgi?id=709588
2013-10-09 15:25:19 -03:00
Stefan Sauer
b5bcd73015 discoverer: filter 'parsed' field when checking for same caps
We're checking the caps to see if we got more caps details after a parser got
plugged. This will also have a flipped 'parsed' field. If the field was already
present before the parse the match will fail. Add a function that will do the
check while excluding this field.
2013-10-07 23:21:05 +02:00
Stefan Sauer
82b6fff272 discoverer: don't shadow local variables 2013-10-07 22:55:46 +02:00
Stefan Sauer
9230a6af6a discoverer: early return when we have no streams 2013-10-07 22:55:46 +02:00
Stefan Sauer
2e1b1699fe discoverer: also log stream-id 2013-10-07 22:55:46 +02:00
Stefan Sauer
2af0831696 discoverer: fix quark-mismatch for toc and stream-id
Seems like a copy'n'paste from 15ee41df.
2013-10-07 21:18:54 +02:00
Stefan Sauer
b13385f96a discoverer: report depth for video
This was returning 0 in all cases. Use the data from GstVideoFormatInfo instead.
2013-10-05 21:03:33 +02:00
Stefan Sauer
20cdbc83f3 discoverer: extract some common code
Extract code to make a GstDiscovererInfo. Extracts code that sets StreamInfo.
2013-10-02 22:26:39 +02:00
Sreerenj Balachandran
9ffaaddcbe pbutils: Add codec-utility funtions to support H265
https://bugzilla.gnome.org/show_bug.cgi?id=708921
2013-10-02 11:37:39 +02:00
Sebastian Dröge
82ade7b1ea descriptions: Add description for H.265 2013-10-01 23:17:06 +02:00
Matej Knopp
057a44899e pbutils: Add entry for text/x-raw
https://bugzilla.gnome.org/show_bug.cgi?id=708954
2013-09-28 11:38:10 +02:00
Matej Knopp
cb70260b48 pbutils: add MPEG 2 AAC description
https://bugzilla.gnome.org/show_bug.cgi?id=708773
2013-09-25 23:13:48 +01:00
Edward Hervey
556687b94b discoverer: Switch to playing to handle live URI
Fixes discovery on dvb://
2013-09-19 12:58:53 +02:00
Matej Knopp
721931d80a pbutils: Add description for TechSmith Screen Capture 2
https://bugzilla.gnome.org/show_bug.cgi?id=707878
2013-09-11 11:04:30 +02:00
Tim-Philipp Müller
6d7ab5a8f9 pbutils: fix and improve raw video format description strings
Mark terms such as "planar", "packed", and "palettized" as
translatable, and re-arrange strings a bit to make them
better suited for translation.

Also fix bug in yuv descriptions, one plane is packed, more
is planar (or semi-planar).

https://bugzilla.gnome.org/show_bug.cgi?id=707789
2013-09-09 19:26:34 +01:00
Josep Torra
f22a2380ef pbutils: add description for MSS1 and MSS2 windows media formats 2013-08-30 15:19:32 +02:00