Commit graph

2203 commits

Author SHA1 Message Date
Vincent Penquerc'h da673880eb theoraenc: do not reset the encoder when we need a keyframe
Instead, remember we need a keyframe, and we will force the encoder
to emit one next time we submit a new frame.
Since libtheora does not have an API to request a keyframe, we reset
the max keyframe interval to 1 temporarily.

This has the advantage that the rate control keeps its history,
and that the encoder won't choose different quant tables or
somesuch, thus requiring new streamheaders (although this is
probably only a theoretical possibility). Should also be a
bit faster than resetting the encoder.

https://bugzilla.gnome.org/show_bug.cgi?id=663350
2013-03-31 15:45:26 +01:00
Greg Rutz c480bac5b7 libvisual: fix improper video frame clear operation
The current code is memsetting the GstVideoFrame.data address to 0s (which
causes a segfault). This member is actually an array of data buffers (one for
each plane).  This fix iterates over each data plane to clear them all.

https://bugzilla.gnome.org/show_bug.cgi?id=695655
2013-03-13 00:51:55 +00:00
Stefan Sauer 28d09d43e5 oggmux: don't keep a static string beyond the ref of the owning object
Also move down the ref for the caps a bit, so tha we don't leak it in the branch that calls continue.
2013-03-05 22:31:26 +01:00
Stefan Sauer ce626fc3d8 oggmux: don't crash on caps being NULL
Also avoid unused variables if debugging is disabled.
2013-03-03 20:51:43 +01:00
Tim-Philipp Müller 4e1ccb2885 vorbis: small GValue optimisation
No need to copy buffers we put into the streamheader any more
now that we don't put caps on buffers any more, so there's no
danger of a refcount cycle.
2013-03-03 17:42:50 +00:00
Tim-Philipp Müller 13b8b35373 theora: small GValue optimisations
No need to copy buffers we put into the streamheader any more
now that we don't put caps on buffers any more, so there's no
danger of a refcount cycle.
2013-03-03 17:42:22 +00:00
Tim-Philipp Müller d97dd36ae5 ogg: small GValue optimisation
No need to copy buffers we put into the streamheader any more
now that we don't put caps on buffers any more, so there's no
danger of a refcount cycle.
2013-03-03 17:40:21 +00:00
Tim-Philipp Müller e045b6fb52 oggdemux: add audio-codec and video-codec tags for streams in more cases 2013-02-28 16:27:50 +00:00
Tim-Philipp Müller 8e4934820f pango: use new GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS define
https://bugzilla.gnome.org/show_bug.cgi?id=665751
2013-02-19 12:54:40 +00:00
Jan Schmidt fb102419c7 pango: 3rd time's the charm. Fix attribute list handling.
Really really fix attribute list handling by taking a
copy of the original attributes that pango_attr_list_filter
can mutate, but keep the original around intact to restore
later.
2013-02-08 00:05:24 +11:00
Jan Schmidt bc42d382e2 pango: Don't modify the original attributes list.
Take a copy of the original attributes list instead of just
a ref, since pango_attr_list_filter can remove elements from it.
2013-02-07 23:45:26 +11:00
Jan Schmidt 2528baf2c2 pango: Remove extra pango_attr_list_copy() from basetextoverlay
Fixes a per-buffer memory leak of the attribute list.
2013-02-07 23:06:57 +11:00
Wim Taymans ef8e17f993 visualizer: improve allocation
Based on patch by Matthew Waters

Add private data
Add decide_allocation vmethod
Refactor bufferpool negotiation

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681719
2013-01-29 10:18:06 +01:00
yanghuolin 67a7b5a993 alsasink: don't use 100% CPU
The root cause is that alsa-lib is not thread safe for the same handle.
There are two threads in the gstreamer accessing alsa-lib not serilized.
The race condition happens when one thread holds the old framebuffer app_ptr
position in the kernel, another thread advances the framebuffer app_ptr.
when the former thread is scheduled to run again, it overwrites the app_ptr
to old value by copying from kernel.Thus,the app_ptr in the upper
alsa-lib(pcm_rate) become one period size more advanced than the lower
alsa-lib(pcm_hw & kernel).

gstreamer uses noblock and poll method to communicate with the alsa-lib.
The app_ptr unsync situation as described above makes the poll return immediately because
it concludes there is enough space for the ring-buffer via the low-level alsa-lib.
The write function returns immediately because it concludes there is not enough
space for the ring-buffer from the upper-level alsa-lib. Then the loop of poll
and write runs again and again until another period size is available for
ring-buffer.This leads to the cpu 100 problem.

delay_lock  is used to avoid the race condition.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=690937
2013-01-24 15:08:31 +01:00
Vincent Penquerc'h 658195e6de oggdemux: fix incorrect testing of invalid granpos values
Positive granulepos is valid, -1 granulepos is unset, and all
other negative granulepos are invalid.

Reported by Tim-Philipp Müller
2013-01-07 18:03:52 +00:00
Tim-Philipp Müller 76c0cca765 textoverlay: minor clean-up
Remove some macros that aren't needed any more.
2012-12-22 21:19:51 +00:00
Tim-Philipp Müller df8e7f14a8 textoverlay: support shaded background for A420 format
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-12-22 21:18:11 +00:00
Thijs Vermeir dc9f19cbba vorbis: fix unused variable 2012-12-18 15:34:42 +01:00
Tim-Philipp Müller df6031f7c6 alsasrc: return negative value on read error
Otherwise baseaudiosrc won't go into the error code path.

https://bugzilla.gnome.org/show_bug.cgi?id=690197
2012-12-17 20:50:33 +00:00
Tim-Philipp Müller 3d5a78e67a alsa: post error message when audio device disappears
Don't loop forever if an USB audio device gets disconnected
while in use. Post an error message instead. This is not
enough yet though, we still need to make the base class
and/or the ring buffer bail out.

https://bugzilla.gnome.org/show_bug.cgi?id=690197
2012-12-16 01:00:43 +00:00
Sebastian Dröge d9b25afe71 ext: Fix some compilation errors caused by circular header includes 2012-12-12 17:22:31 +00:00
Tim-Philipp Müller 71e46b2478 gst_adapter_prev_timestamp -> gst_adapter_prev_pts
https://bugzilla.gnome.org/show_bug.cgi?id=675598
2012-11-14 00:03:15 +00:00
Sebastian Dröge c09f503f72 Revert "vorbisdec: Fix GType name conflict if tremor and libvorbis decoder are used in the same process"
This reverts commit 858392f88a.

A similar, cleaner fix was already in place.
2012-11-13 16:11:42 +01:00
Sebastian Dröge 858392f88a vorbisdec: Fix GType name conflict if tremor and libvorbis decoder are used in the same process 2012-11-13 15:41:34 +01:00
Tim-Philipp Müller ba255fbac6 textoverlay: implement background shading for IYU1
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-11-07 13:59:53 +00:00
Tim-Philipp Müller bd578c1dd4 textoverlay: also draw shaded backgrounds for RGB and BGR
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-11-07 13:25:13 +00:00
Tim-Philipp Müller caad241432 textoverlay: we can do YVU9 as well 2012-11-07 11:36:42 +00:00
Tim-Philipp Müller 16350b7d66 textoverlay: don't advertise 10-16-bit formats we can't blend text onto yet
We can't blend stuff on top of video formats that unpack into
ARGB64 or AYUV64 yet, so don't advertise them in our template caps.
2012-11-07 11:32:50 +00:00
Tim-Philipp Müller e3bb068392 textoverlay: fix up names of old gray formats
Y800 -> GRAY8, Y16 -> GRAY16_{LE,BE}
2012-11-07 09:46:50 +00:00
Tim-Philipp Müller 74343165e1 textoverlay: draw shaded background for some more video formats
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-11-07 09:41:13 +00:00
Tim-Philipp Müller bedbfd0091 textoverlay: clamp shaded background box coordinates in one place 2012-11-07 09:41:13 +00:00
Tim-Philipp Müller 4aace8e0eb textoverlay: move background shading into separate function 2012-11-07 09:41:13 +00:00
Tim-Philipp Müller a53f0f382e textoverlay: don't abort if we don't know how to paint shaded background for a format
It's not a very nice thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=687666
2012-11-06 23:44:01 +00:00
Sreerenj Balachandran 6cbcca0bc5 textoverlay: forward allocation queries on video sink pad instead of discarding them
This allows the upstream elements to use the allocation parameters
or pools from the downstream elements like videosink.

https://bugzilla.gnome.org/show_bug.cgi?id=687459
2012-11-05 13:27:56 +00:00
Tim-Philipp Müller 5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Jonathan Liu 7f22e3ea7f oggstream: fix crash with 0 byte ogg packets
https://bugzilla.gnome.org/show_bug.cgi?id=687030
2012-10-29 12:04:38 +00:00
Tim-Philipp Müller 3138c4e696 pango: avoid unnecessary pango attribute list copy
We just want to keep it alive, not modify it, so a
simple ref should be enough.

https://bugzilla.gnome.org/show_bug.cgi?id=686841
2012-10-25 17:16:58 +01:00
Jihyun Cho 2e0174e13c pango: delete foreground color in shadow text
This makes colored text have gray drop shadows
instead of colored ones, which looks much better.

https://bugzilla.gnome.org/show_bug.cgi?id=686841
2012-10-25 17:16:58 +01:00
Sebastian Dröge 3c1041d5eb Revert "gst: Add better support for static plugins"
This reverts commit d2d79e3bc2,
which was accidentially pushed.
2012-10-24 13:26:26 +02:00
Sebastian Dröge d2d79e3bc2 gst: Add better support for static plugins 2012-10-24 12:10:44 +02:00
Tim-Philipp Müller ccbb233da8 alsasink: fix caps leak in acceptcaps function
https://bugzilla.gnome.org/show_bug.cgi?id=681192
2012-10-20 11:38:55 +01:00
Tim-Philipp Müller 1a69ec3fd3 alsa: if no formats in native endianness could be detected, try non-native endianness as well
This can happen, e.g. when using an USB sound card on
a big-endian device

https://bugzilla.gnome.org/show_bug.cgi?id=680904
2012-10-18 11:04:06 +01:00
Tim-Philipp Müller 1e329bb4f4 alsa: fix supported format detection
The format probing code was assuming there'd be one caps
structure for each separate width/depth combination like
we did in 0.10 all over the place: for one, we'd query
unsigned/signed formats together for the same width/height,
and we'd add the entire current structure to the probed
caps when we find a format is supported. Now that we have
all raw formats in a single structure, this is all not going
to work so well any more. We added the entire structure with
all possible formats to the caps if we support just one format.

Fix probing so that we only return the list of actually
supported raw audio formats (with native endianness) from
get_caps().
2012-10-18 11:03:07 +01:00
Tim-Philipp Müller 224fb90469 theora, app: use gst_element_class_set_static_metadata()
Avoids string copies.
2012-10-17 16:54:14 +01:00
Sebastian Dröge 754d0fca25 ivorbisdec: Rename debug category to prevent symbol conflict when using static linking 2012-10-09 13:10:38 +02:00
Wim Taymans 3591df23b1 docs: playbin2 -> playbin 2012-10-09 12:20:10 +02:00
Sebastian Dröge c4fb8d1e69 basetextoverlay: Correctly handle empty text buffers 2012-09-27 12:41:28 +02:00
Tim-Philipp Müller 1c22b1fe11 oggmux: send stream-start event 2012-09-23 13:27:27 +01:00
Tim-Philipp Müller e072bd6130 oggmux: fix up previous commit
Was missing the header file change.
2012-09-21 16:10:27 +01:00
Tim-Philipp Müller 5890a4a803 oggmux: send a segment event at the beginning 2012-09-21 15:58:07 +01:00