Commit graph

4878 commits

Author SHA1 Message Date
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Vivia Nikolaidou
a122135194 videotimecode: Fix invalid timecode right before a new second
When initializing a timecode from a GDateTime, and the remaining time
until the new second is less than half a frame (according to the given
frame rate), it would lead to the creation of an invalid timecode, e.g.
00:00:00:25 (at 25 fps) instead of 00:00:01:00. Fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=779866
2017-03-10 17:47:46 +02:00
Matthew Waters
d15b0f4844 videodecoder: fix build error on i386
Use G_GUINT64_FORMAT for guint64 values.

Introduced by fcb63e77a9

Found by Alexander Larsson

gstvideodecoder.c: In function 'gst_video_decoder_have_frame':
gstvideodecoder.c:3312:51: error: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
2017-03-10 18:23:48 +11:00
Sebastian Dröge
9460d40054 videotimecode: Unref GDateTime in error cases 2017-03-08 15:47:52 +02:00
Jan Schmidt
052d34478f videodecoder: Fix a leak introduced in fcb63e
CID: 1402055
2017-03-06 19:14:48 +11:00
Jan Schmidt
6ac79da6a2 videodecoder: Restrict frame timestamp guessing in reverse mode
Don't guess a timestamp of the start of the segment when running
in reverse mode, as more likely it means we're discontinuous somewhere
in the middle of the segment, and we'll fix up timestamps once
the frames are decoded and reversed.
2017-03-04 00:30:37 +11:00
Jan Schmidt
fcb63e77a9 videodecoder: Store buffer information even without PTS
When a PTS is not set, we still want to store the rest of the
buffer information, or else we lose important things like the
duration or buffer flags when parsing.
2017-03-04 00:30:37 +11:00
Sebastian Dröge
daa0e18c75 videodecoder: Handle return value of gst_video_decoder_drain()
CID 1362896
2017-02-28 15:11:42 +02:00
Sebastian Dröge
0f7b9dbe75 video-converter: Give a name to the thread-pool threads
This way they can be distinguished from any other threads in the same
process.
2017-02-24 10:04:21 +02:00
Sebastian Dröge
6d20fcc9df video-converter: Only lock the thread pool mutex when running with more than 1 thread
There's no reason to lock anything if only the current thread is ever
going to do any work.
2017-02-24 10:02:28 +02:00
Sebastian Dröge
49ac382b47 video-converter: Implement multi-threaded scaling/conversion
This adds a property to select the maximum number of threads to use for
conversion and scaling. During processing, each plane is split into
an equal number of consecutive lines that are then processed by each
thread.

During tests, this gave up to 1.8x speedup with 2 threads and up to 3.2x
speedup with 4 threads when converting e.g. 1080p to 4k in v210.

https://bugzilla.gnome.org/show_bug.cgi?id=778974
2017-02-23 21:55:29 +02:00
Georg Lippitsch
d15ad75caf videotimecode: Validate for drop-frame correctness
In gst_video_time_code_is_valid, also check for invalid
ranges when using drop-frame TC. Refactor some code which
broke after the check was added.

https://bugzilla.gnome.org/show_bug.cgi?id=779010
2017-02-23 19:56:26 +02:00
Georg Lippitsch
b3df5786a9 videotimecode: Init from GDateTime
Add a function to init the time code from a GDateTime

https://bugzilla.gnome.org/show_bug.cgi?id=778702
2017-02-23 19:50:39 +02:00
Sebastian Dröge
ab854b04ba video-scaler: Fix upscaling if width & height change and we're starting not at y=0
It was taking the initial input y-offset from the output value, which
only works for y=0 (in which case both are the same). If y > 0, we would
always stay behind the requested input offset and never ever read
anything from the input.
2017-02-15 21:43:32 +02:00
Thibault Saunier
d5fbc905e3 discoverer: Ignore more parser related fields when comparing streams
The parser might do some conversion on a stream but the stream keeps
being the same, and we need to make sure GstDiscoverer detects it is the
case.

https://bugzilla.gnome.org/show_bug.cgi?id=778298
2017-02-08 15:56:34 -03:00
Jan Schmidt
5903e2dfbb audioringbuffer: Also add FLAC to debug strings.
Oops, also add FLAC to the debug strings array.

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:46:42 +11:00
Jan Schmidt
04c14de1d1 audioringbuffer: Prevent overflow of debug names array
Add new audio types to the list of strings used for debug
so we don't index past the end of that array.

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:42:33 +11:00
Sebastian Dröge
f939f05304 audio-resampler: Fix integer overflow in clamping code
https://bugzilla.gnome.org/show_bug.cgi?id=777921
2017-01-30 12:35:04 +02:00
Tim-Philipp Müller
83e84d5acf audio: add since markers to docs for new enums
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 20:04:54 +00:00
Vincent Penquerc'h
6134dab3bb audio: add FLAC to GstAudioRingBufferFormatType
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:47:39 -05:00
Olivier Crete
c46607095e audioringbuffer: Also support raw AAC
Support raw AAC streams without the ADTS header

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:45:50 -05:00
Sebastian Dröge
5d505d1088 riff-media: Don't divide block align by zero channels
https://bugzilla.gnome.org/show_bug.cgi?id=777525
2017-01-20 12:41:16 +02:00
Sebastian Dröge
ef55c8a6b7 riff-media: Don't recurse in for nested WAVEFORMATEX
There was already a check for that, but it failed because
subformat_guid[0] is a guint32 and that is then casted implicitely to a
guint16 when recursing... just that we checked the uncasted value.

This caused an infinite recursion and thus stack overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=777265
2017-01-18 13:11:07 +02:00
Sebastian Dröge
81d3ba3fa2 riff-media: Check for valid channels/rate before using the values
Otherwise we might divide by zero or otherwise create invalid caps.

https://bugzilla.gnome.org/show_bug.cgi?id=777262
2017-01-15 18:32:34 +01:00
Sebastian Dröge
d0c1b34288 video-converter: Fix crashes in fast-paths when converting interlaced formats with different vertical subsampling
E.g. the following pipelines fail because chroma values after the last
line are read (note: 486 % 4 == 2):

gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=UYVY" ! videoconvert ! "video/x-raw,format=I420" ! fakesink
gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=I420" ! videoconvert ! "video/x-raw,format=UYVY" ! fakesink
gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=I420" ! videoconvert ! "video/x-raw,format=AYUV" ! fakesink
2017-01-11 18:41:14 +02:00
Vivia Nikolaidou
629e8229a7 videotimecode: New GstVideoTimeCodeInterval type, ability to add to a GstVideoTimeCode
Sometimes there is a human-oriented timecode that represents an
interval between two other timecodes. It corresponds to the human
perception of "add X hours" or "add X seconds" to a specific timecode,
taking drop-frame oddities into account. This interval-representing
timecode is now a GstVideoTimeCodeInterval. Also added function to add it to
a GstVideoTimeCode.

https://bugzilla.gnome.org/show_bug.cgi?id=776447
2017-01-11 11:05:21 +11:00
Thibault Saunier
9e86b2931d pbutils: Fix annotation in gst_encoding_profile_set_preset 2017-01-10 08:57:51 -03:00
Vivia Nikolaidou
06ff74e51d videotimecode: Add GstValue functions
Add compare, serialization and deserialization functions

https://bugzilla.gnome.org/show_bug.cgi?id=772764
2017-01-09 18:56:16 +02:00
Jan Schmidt
cca3a5b194 gst_video_guess_framerate: Don't throw away all precision
When operating on framerates near 10000fps, at least keep 1
digit of precision for calculations
2017-01-09 21:25:26 +11:00
Thibault Saunier
99c35c29ea encoding-target: Properly free temporary list 2017-01-06 11:40:20 -03:00
Thibault Saunier
46b424a38b encoding-profile: Add a way to copy an encoding profile
It is often usefull to make sure that you get a full copy of a profile.
For example you want to let the user modify it in the user interface
but still keep an unchanged version for later use.

API:
  gst_encoding_profile_copy
2017-01-06 11:40:20 -03:00
Tobias Mueller
57ff3ea72f appsrc: fix compiler warning
Initialize min and max _get_property() to gets rid of these
compiler warnings:

gstappsrc.c:741:7: error: 'max' may be used uninitialized in this function
       g_value_set_int64 (value, max);
       ^
gstappsrc.c:733:7: error: 'min' may be used uninitialized in this function
       g_value_set_int64 (value, min);
       ^
Which happens because gcc doesn't know that GST_IS_APP_SRC will never
fail here.

https://bugzilla.gnome.org/show_bug.cgi?id=752052
2016-12-25 13:15:26 +00:00
Stuart Weaver
0cf08d90c0 rtsp-url: unescape special chars in user/pass part of URL
This way special characters such as '@' can be used in
usernames or passwords, e.g.

  rtsp://view:%40dm%4An@<IP-ADDR>/media/camera1

will now parse username and password into:

  User: view
  Pass: @dm:n

https://bugzilla.gnome.org/show_bug.cgi?id=758389
2016-12-25 12:08:45 +00:00
Vineeth TM
c0a18df468 discoverer: Add support to dump dot files
Dump graphs during error/warning messages and discover is done

https://bugzilla.gnome.org/show_bug.cgi?id=758259
2016-12-25 11:49:49 +00:00
Thomas Bluemel
cd101ce8f0 id3v2: fix splitting strings in ISO-8859-1 and UTF-16 formats
When parsing NUL-terminated strings, do not include the terminating
NUL byte(s).  Depending on the encoding used, either g_utf8_validate()
failed due to this, or worse the call to g_utf16_to_utf8() would
return 0 items read on an empty string, causing it to fail parsing
certain frames.

https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:52:39 +00:00
Thomas Bluemel
da6070054f id3v2: fix handling of tags with extended headers
The extended header size value does not include itself.

https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:35:47 +00:00
Thibault Saunier
cd4253028e encoding-profile: Initialize variables to avoid build failures
encoding-profile.c: In function ‘get_profile_format_from_possible_factory_name’:
encoding-profile.c:1532:6: error: ‘fact’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (fact)
      ^
encoding-profile.c: In function ‘profile_from_string’:
encoding-profile.c:1720:6: error: ‘res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (profile)
      ^
cc1: all warnings being treated as errors
2016-12-23 18:08:43 -03:00
Thibault Saunier
51cd2bd926 encoding-profile: Allow using factory names in serialization format
Instead of enforcing the user to know and understand caps to describe
the encoding format, let him use element factory names directly.
This also makes it possible to ensure that a specific encodore/muxer
is used instead of letting the ranking system do it.

It is now possible to describe an encoding format simply specifying:

  matroskamux:x264enc:vobisenc

Factor out functions in the parsing, cleaning up the whole thing.
Update documentation.
2016-12-23 17:40:23 -03:00
Thibault Saunier
998f28b65c encoding-profile: Also take into account preset name when comparing profiles 2016-12-23 17:40:23 -03:00
Thibault Saunier
636cd255ce encoding-profile: Handle path to serialized target when deserializing a profile
The synthax is path/to/encoding/profile.gep:profilename
2016-12-23 17:40:23 -03:00
Thibault Saunier
40088a9f5d encoding-target: Add 'file-extension' as a known category 2016-12-23 17:40:23 -03:00
Thibault Saunier
85979f996d encoding-target: Allow using name and targets from serialized file
We used to only care about the name of the files even if the name
is defined in the encoding target serialized file.

That commit also allows user to define several names for a single
target file (using a ';' between the names) which allows us to have
a target for youtube that is called 'youtube;yt' or a target for
'ogg;ogv;oga' file extension.
2016-12-23 17:40:23 -03:00
Thibault Saunier
2c9db14d03 encoding-target: Auto convert loading target name to lowercase
We *only* support lowercase encoding target names so we can just
handle user to use uper case ones converting them.
2016-12-23 17:40:23 -03:00
Thibault Saunier
bff04a1396 pbutils: Add documentation about encoding targets 2016-12-23 17:40:23 -03:00
Evan Nemerson
98064ed9bf audioringbuffer: add set_callback_full() for g-i
https://bugzilla.gnome.org/show_bug.cgi?id=678301
2016-12-22 15:34:58 +00:00
Sebastian Dröge
19ece085ac riff-media: Fix up last commit 2016-12-20 13:00:59 +02:00
Nicola Murino
a75be73471 riff: add ADPCM_G722 support
https://bugzilla.gnome.org/show_bug.cgi?id=746574
2016-12-20 12:48:32 +02:00
Tim-Philipp Müller
2cfb446eb9 tag: id3v2: turn redundant check into an assert
We checked this already earlier, so this is dead code.
Leave an assert in place for consistency with the other
branch and in case the rest of the code changes.

CID 1397350.
2016-12-18 12:29:42 +00:00
Sebastian Dröge
15123c0455 discoverer: Get caps from the element's srcpad if possible
The caps put into the stream topology by decodebin are the caps at the
moment the pads are exposed on it. This is usually before decoders
received any buffers.
In discoverer we however wait for pre-roll, which ensures that each
decoder handled buffers already. At this point, there might be more
information known about the caps already that we could make use of.

One example here is extra information stored in the SEI of H264, like
the multiview-mode. This will be known if there is a SEI before the
first keyframe, but decodebin won't put this into the topology as it
only waits for the initial caps of h264parse (which come directly after
SPS/PPS).

With this change, the multiview-mode is in the caps reported by
discoverer in many cases.
2016-12-17 22:01:10 +02:00
Thibault Saunier
d67f945177 encoding-profile: Fix documentation and port to gtk markdown
And remove some trailling whitepsaces
2016-12-16 11:27:31 -03:00