Ogg mandates the first header packet must determine a stream's type.
However, some streams (such as VP8) do not include such a header
when muxed in other containers, and thus do not include this header
as a buffer, but only in caps. We thus use headers from caps when
available to determine a new stream's type.
https://bugzilla.gnome.org/show_bug.cgi?id=647856
gcc on OSX complains about ret being used uninitialized in
this function, and it is right. Don't leak element ref
when returning early because newsegment event is not in
TIME format.
Remove the android/ top dir
Fixe the Makefile.am to be androgenized
To build gstreamer for android we are now using androgenizer which generates the
needed Android.mk files.
Androgenizer can be found here:
http://git.collabora.co.uk/?p=user/derek/androgenizer.git
Also initialize it always in TIME format. We require TIME segments
in oggmux anyway and drop newsegment events in other formats and
assume an open-ended segment starting at 0.
Theora and vorbis use running time (which is correct) for calculating
the granulepos for their ogg packets. Oggmux, however, used
timestamps to order the received buffers.
This patch makes it use the running time to compare buffer times
and also to timestamp pushed buffers.
Some bits of the code still use timestamps, but they are only
used to calculate durations, so it should be fine.
https://bugzilla.gnome.org/show_bug.cgi?id=643775
'A OVER B' compositing is explained at
http://en.wikipedia.org/wiki/Alpha_compositing.
Previously, overlaying text on a transparent background image left the
text overlay also transparent. This pipeline shows such an example:
gst-launch videotestsrc pattern=white ! video/x-raw-yuv,format=\(fourcc\)AYUV ! alpha alpha=0.0 ! textoverlay text=Testing auto-resize=False font-desc=60px ! videomixer ! ffmpegcolorspace ! autovideosink
With this patch, text is composited "OVER" the background image and
thus is visible regardless of the alpha of the background image. The
overlay in the above pipeline works after applying this patch.
Pango is not reentrant. Use a class wide mutex to protect pange use in
gst_text_overlay_render_pangocairo(). This works reliable in contrast to the
hack in my previous commit.
Fixes Bug #412678
The speed-level property, which allows callers to trade of encoding
quality for speed in the libtheora api, has a version-dependent
maximum and default values. Instead of hardcoding the acceptable
range for the theoraenc element's presentation of this setting,
we query the library directly at class initialization time and
set the maximum and default values from that. If the query fails,
we fall back to the previous default setting.
To keep the values reported by gst-inspect (which I'm told use
the spec values from the class) with those available on an\
instantiated element, we remove to setting of enc->speed_level
from the initializer and instead pass G_PARAM_CONSTRUCT to
the property spec flags, asking g_object to set this property
when theoraenc objects are constructed.
NB in theory the maximum speed-level could depend on the actual
video caps. If later versions of libtheoraenc do this, a second
call will need to be made from theora_enc_reset to update the
property, since this function is mostly useful for realtime
adjustment of performance while the pipeline is running.
libtheora has two encoding modes, CBR, where it tries to hit a target
bitrate and VBR where it tries to achieve a target quality.
Internally if the target bitrate is set to anything other then 0 the
encoding-mode is CBR.
This means that the gstreamer element can leave the video_quality
setting alone as long as the user is tweaking the bitrate. Which has the
nice side-effect that if the user explicitely sets the bitrate to 0
(which is actually the default), the quality value doesn't get reset and
one ends up encoding VBR at quality-level 0...
In case the ogg mapper doesn't handle all the accepted input formats
(although it really should). Saves us error handling for that case
though. Also log caps properly.
https://bugzilla.gnome.org/show_bug.cgi?id=629196
Using the IN_CAPS flag for this is brittle, and will fail if either
vorbisparse or vorbistag (which is itself based on vorbisparse) is
inserted between oggdemux and oggmux. Possibly other elements too
(eg, theoraparse, etc).
Using oggstream ensures we Get It Right More Often Than Not.
https://bugzilla.gnome.org/show_bug.cgi?id=629196
Discontinuities are automatically signalled by oggdemux at the start
of a new stream. When oggmux is yet to output actual data pages,
do not signal these discontinuities in the ogg stream.
This patch may miss some actual discontinuities at the very start of
a stream, but avoids the spurious missing pages when encoding happens
normally.
A better fix might involve finding a way to distinguish between actual
data discontinuities and discontinuities merely marking the start of
a new stream.
Fixes an issue with ogg page numbering (would skip a number for no
reason, which then looks like a packet was lost somewhere) when
re-muxing an ogg stream, e.g. when re-tagging in rhythmbox.
https://bugzilla.gnome.org/show_bug.cgi?id=629196
Remove "This property requires libtheora version >= 1.1" qualifiers
from property descriptions. They aren't needed any longer now that
we require libtheora >= 1.1.
This was causing keyframe_granule to be set to 0 for all streams
when seeking to the beginning of the stream, i.e., at the
beginning of playback. Fixes#619778.
Instead, use either 0 or 1, depending on bitstream version, which give
the correct result for streams which aren't cut off at start.
This allows that function to not return negative granpos.
https://bugzilla.gnome.org/show_bug.cgi?id=638276
The offset part of the granpos is not a sign of the newer encoding.
Use the version number instead.
This fixes the criticals thrown by theoraparse, and (at last) the
remaining part of #553244.
allocate buffers using gst_buffer_new_and_alloc() instead of
gst_pad_alloc_buffer_and_set_caps(), as the first one will
cause the pad to block, and we don't want that since that will
prevent subsequent pads from being fed if a block occurs at
start, when all pads must be fed for playback to start.
This fixes autoplugging of the tiger element and other things.
https://bugzilla.gnome.org/show_bug.cgi?id=637822
Oggdemux will currently try to pad alloc a buffer from the peer when it is
reading the header files. This is a relic from the time where we had an internal
parser and needs to be removed at some point in time.
The problem is that when there is no peer pad yet (which is normal when
collecting headers) we should still continue to parse all the packets of a
page instead of erroring out on NOT_LINKED.
Fixes#632167
Only keep the last valid granulepos we see when scanning the last
pages. It is possible that the last page that we inspect has a -1 granulepos, in
which case we want to keep the previous valid time instead.
Fixes#631703
Since this is just a debugging feature and libtheora will usually not be
compiled with that option enabled, we should maybe just hide these properties,
since they won't work anyway, and avoid confusing warnings.
Also rename properties to make them less cryptic.
https://bugzilla.gnome.org/show_bug.cgi?id=628488
Files with a skeleton, or other files with a stream that ends before the end of
the chain would start playing from the end of the chain when trying to seek with
a negative rate at a position between the end of any stream and the end of the
chain.
This is due to the loop in _do_seek() assuming that pages will be encountered
for all streams shortly after the place where we want to seek, as found by
do_binary_search().
In the first iteration of the loop, stream ends are now checked against the
time of the current page.
In case of odd values for xpos or ypos, the division by two in CbCr
plane would result in an off-by-one error, which in the case of NV12,
NV21, or UYVY would cause inversion of blue and red colors. (And
would be not so easily noticed for I420 as it would just cause the
chroma to be offset slightly from the luma.)
This patch also fixes a silly typo from the earlier patch which
added NV12 support that broke UYVY support.
The textoverlay element will rerender the text string whenever
overlay sets the 'need_render' flag to TRUE. Previously, we
lazily set the flag to TRUE every time the time string was requested.
Now, we save a copy of the previously given string, and only set
'need_render' to TRUE if the string has changed.
In my tests with a 30fps video stream, and a time string including
a seconds field, this change reduced the CPU usage of the clockoverlay
element from 60% to 5%.
Fixes bug #627780.
Alsa seems to expect that we initialize it. Remove the variable and pass NULL
as we actually don't use it. In alsasink also #ifdef one section that is
grabing diagnostics to be disabled, when logging is disabled (the code was
using the out parameter as well).
Fixes#626125
Rather than only left, right, top, etc, allow for horizontal and vertical
positioning on a scale from 0 to 1.
Also cater for configuring rendered text color.
Fixes#624920.
API: GstTextOverlay:xpos
API: GstTextOverlay:ypos
API: GstTextOverlay:color
Just cast the pointer diff, so it works everywhere without
warnings. Can't use %tu, because that modifier is C99. Warning
was: "format '%li' expects type 'long int', but argument 8 has
type 'int'".
cdparanoia now has a .pc file in post-0.10.2 SVN, so use
that to check for cdparanoia before we try all the other
checks. Besides being generally nicer, this may help with
correctly detecting cdparanoia on OSX some day (see #609918).
Convert seek requests to bytes using the bitrate and forward them upstream. Does
not quite work because the flushing and resyncing is not implemented yet.
Errors could happen here when the device was removed already
or when something is broken anyway. If errors happen here and
they're propagated, the element can't shutdown cleanly.
Fixes bug #614545.
We know our plugins and examples are independent of each other, so may
just as well build them in parallel. Makes the output a bit messy, but
that shouldn't be a problem and can easily be avoided with make -j1.
g_file_input_stream_query_info() had char * instead of const char *
as attribute argument before 2.20.
Fixes#613387, spotted by tetsuyayasuda@gmail.com
And fix the resulting compile failures.
I'm sorry about the patch necessary to gstclockoverlay.h but after
talking to Tim we decided we can live with it.
We update the passed begintime argument to narrow our search region in the
binary search. This means that it does not always contain the chain begin time
after a couple of bisects. Use the real chain->begin_time to bring the
granuletime to the time in the chain instead.
Fixes#610005
This can happen if the combined flow return is not OK although the
allocation succeeded or if the packet in question is a BOS and we're
not going to push headers.
Fixes bug #608699.
Use _ogg_packet_free() instead of gst_mini_object_unref in one more
place now that the header list contains ogg packets and not buffers.
file: Stephen_Fry-Happy_Birthday_GNU-nq_600px_425kbit.ogv