Commit graph

2068 commits

Author SHA1 Message Date
Nicolas Dufresne
74a64be001 v4l2-allocator: Add S to REQBUFS/CREATE_BUFS enum
All enum that has REQBUFS and CREATE_BUFS where missing S, which was
confusing since they are supposed to match with associcated ioctl name. This
also fixes the yet unused CAN_REQUEST flag check.
2014-05-08 15:56:37 -04:00
Nicolas Dufresne
3500e44f17 v4l2transform: Enabled QoS 2014-05-08 15:56:37 -04:00
Nicolas Dufresne
62605e11eb v4l2: Fixup USERPTR/DMABUF capture support 2014-05-08 15:56:37 -04:00
Nicolas Dufresne
7f8eff7845 v4l2object: Improve selecton of min/max in decide allocation 2014-05-08 15:56:37 -04:00
Nicolas Dufresne
ba32cf10f3 v4l2bufferpool: Update config if meta is missing
Rather then hard failure, we should update the config with the meta option we
need and return false.
2014-05-08 15:56:37 -04:00
Nicolas Dufresne
92bdd596f2 v4l2: Add DMABUF and USERPTR importation 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
a114a32d22 v4l2allocator: Valid FD are bigger or equal to zero 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
d3383f9d4c v4l2object: Don't leak downstream pool in propose_allocation
parse_nth_allocation_pool() give a ref on the pool, we need to unref it
when done.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
eee61f39e5 v4l2: Introduce DMABUF_IMPORT IO mode 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
1ab90ababa v4l2: Add dmabuf export support
This can be enabled sing io-mode=dmabuf. This will enabled mmap base
drivers to export the buffers as dmabuf.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
7b00d7ac46 v4l2allocator: Guaranty queued state integrety
Because of the buf in videobuf2, dqbuf may leave the DONE flag being,
which would implied that the buffer is queued. As this has been broken
for 4 years, simply guaranty the state flags integrity when doing
qbuf/dqbuf.

See https://patchwork.linuxtv.org/patch/23641/
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
783417ee9f v4l2transform: Implement open/close 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
23e273acb2 v4l2transform: Ensure output pool is configured 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
026f79b5bd v4l2transform: Check if caps have changes before asserting
In set_caps, now checks if caps actually changed and succeed if they didn't
change.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
a89986ebd5 v4l2videodec: Ensure pool is configured 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
83f053e980 v4l2object: Always set a size when deciding allocation 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
acebdd86da v4l2object: Improved decide allocation
Improve decide allocation so it properly configure both local and downstream
buffer pools. Also read back the pool config if it was changed to to driver
limitations.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
cf6c7e9846 v4l2bufferpool: Do not pre-configure the pool
Pre-configuring the pool is error prone, since it may hide a configuration failure and
endup with a pool that is not configured the way it should (e.g. no video meta, wrong
queue size, etc.)
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
fa6cd1d25a v4l2bufferpool: Preserve downstream minimum even in RW 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
7b8bb7188b v4l2bufferpool: Turn cropmeta into a custom option
Turn crop meta into a custom option and make sure it's there is needed.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
db3d2f35f0 v4l2bufferpool: Early catch short allocation
Catch short allocation after saving the format. This is not a catch all, but should catch
most of the miss-behaving drivers when doing S_FMT/G_FMT and avoid potential crash.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
2b0ac06ade v4l2bufferpool: Port to use GstV4l2Allocator 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
fd13e9e96d Implement V4l2 Allocator
This goal of this allocator is mainly to allow tracking the memory.
Currently, when a buffer memory has been modified, the buffer and it's
memory is disposed and lost until the stream is restarted.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
1b4561cf35 v4l2object: Don't advertise crop meta
Currently we advertise crop meta, but not element handle support this meta.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
a721e54922 v4l2object: Setup pool already send element error 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
409cccb477 v4l2object: Workaround decoder that set num_planes to 0 in the format
Some well known decoder wrongly set num_planes to 0 in their format instead of
one. In this case we would endup with no size when deciding buffer allocation.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
46ffef798c v4l2object: Ensure size before configuring the pool 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
5a61fb7f25 v4l2object: Set minimum buffers to 2
All the element requires at least two buffers. This is not used for RW mode.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
3393083497 v4l2object: Remove unused MAX_BUFFERS define 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
8f6bd0dbc0 v4l2object: Don't hardcode min/max use default instead 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
f6d425bf0f v4l2transform: Install PROP_CAPTURE_IO_MODE with right ID 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
1635697f7e v4l2transform: decide_allocation returns a boolean 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
cf788c9ec7 v4l2videodec: Install PROP_CAPTURE_IO_MODE with right ID 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
527df8b888 v4l2transform: Add propose_allocation
This should remove 1 copy between the decoder and the transform.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
0488984f82 v4l2: Move propose allocation to v4l2object 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
f810196b3e v4l2transform: Fixup caps query 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
d4c24cc52f v4l2transform: Setup cropping if needed 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
2676ac9075 v4l2transform: Expose BGRA and ARGB formats 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
10b67e9913 v4l2transform: Ensure output pool is activated
That pool may be different then the internal pool.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
91efa79ed9 v4l2transform: Ensure internal buffer pools actication 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
7a4b076099 v4l2transform: Move subinstance subclass init near other init 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
6d5ffe8da2 v4l2transform: Stop stream before closing the devices. 2014-05-08 15:56:35 -04:00
Víctor Manuel Jáquez Leal
4f7ee5c130 v4l2transform: copy metdata 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
b781156625 Implement GstV4l2Transform
Implement a v4l2 element that wraps HW video converters.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
0028de808b v4l2: Probe for CREATE_BUFS in order to correctly set pool min/max
In order to correctly set the pool min/max, we need to probe for CREATE_BUFS
ioctl. This can be done as soon as the format has been negotiated using a
count of 0.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
8d6e72a299 v4l2: Move capture eos handling in _process()
Now that we might be copying out buffer (e.g. downstream don't support video
meta bug we need it) we need to move the EOS handling inside the process
method.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
49065b1693 v4l2object: Fix support for planar format in 1 v4l2 mplane
So far we where only setting saving the first plane stride in the meta. This was
leading to wrong values in GstVideoMeta.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
a6a8c2b5eb v4l2videodec: Cleanly fail if set_format is never called 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
a8e81bd81e v4l2: Expose RGB32 formats with and without alpha
As soon a the alpha component can be set, we can expose the RGB32 and BGR32
format as ARGB and BGRA as long we can deterministically set the alpha padding
value.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
403909d873 v4l2: Correctly check if video meta is needed
Correctly check if video meta is needed. In buffer pool, trust need_video_meta
flag in order to decide if configuration should succeed.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
f70bb08411 v4l2object: Fix tiled stride request
Fix stride request for tiled format and improve logging.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
36dfdff84c v4l2object: Ensure video and crop meta are enabled if needed
In certain cases we cannot live without video meta and/or crop meta
being enabled in our internal buffer pool. Ensure this is always the case,
regardless of having support for allocation query.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
e9eba56cd3 v4l2videodec: Ensure internal pool are activated 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
a8024fef04 v4l2videodec: Check that pool where allocated before flushing them
Upon error, the pools might not have been allocated yet, hence we should not
try and flush them (even though we still want to make sure the processing thread
is fully stopped).
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
6196026c76 v4l2bufferpool: Enforce activation outside of process
Enforce pool being activate from before calling pool process. This should
help catching basic errors in the usage of buffer pool.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
efe68f086f v4l2object: don't use own pool if downstream don't support video meta 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
2f00119e3b v4l2bufferpool: Use obj->n_v4l2_planes for correct number of planes
Buffer pool was guessing wrongly the number of planes rather
then reading the value from obj->n_v4l2_planes. This was causing
format YU12 (I420) to fail upon check.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
f3ce6fd25b v4l2object: Fix handling of contiuous vs non-contiguous support
The complex mechanic to try and choose the right thing did not work. Instead,
simply probe the non-contiguous format first and then the contiguous one.
This is in fact very low overhead, as there is a relatively small number of
pixel format supported by each devices.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
a7286563ee v4l2: Add initial support for alignment and cropping 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
70e7868f18 v4l2object: Rename setup_format() method into acquire_format()
The setup_format() was confusing since it does not set anything, in fact
it reads the setup from the driver and save it.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
8cf1c330d5 v4l2object: Move type declaration to the top 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
b4d89b9809 v4l2videodec: Protect NULL pool while going to READY
When the pipeline fails early, the pool might be unset before the processing
thread has run once. Add protection against that.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
b5dde037b4 v4l2object: Fail cleanly if pixel format is unkown or not raw video
Certain decoder has been found to not choose a format automatically. Running
v4l2videodec on these would assert. This patch will make it fail cleanly
instead.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
7e379e8fff v4l2videodec: Clear the input state pointer after unref
If caps are set again, we have a risk od returning from set_format with a
input_state pointing to dead memory. Clearing the pointer after unref fix
this issue.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
7101c4341a v4l2videodec: handle stop being called without flush
Uppon certain downstream error, stop() is called without a flush(). This mean that
the streaming thread may still be running even though unlock has been called.
Now calling flush to reset the decoder state if we are processing.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
fb852669de v4l2videodec: Default to template in caps query 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
27a617d75f v4l2videodec: Ensure processing thread has stopped when draining 2014-05-08 15:56:35 -04:00
Nicolas Dufresne
6f48c74f2a v4l2videodec: Don't drain if processing thread is inactive 2014-05-08 15:56:35 -04:00
Tim-Philipp Müller
17c107d4e4 v4l2: minor fix for closing the fd
The fd returned by open() could theoretically be 0 as well.

Coverity CID 1211823.
2014-05-05 12:07:25 +01:00
Nicolas Dufresne
717bbbbe70 v4l2devicemonitor: Port to use GstV4l2Iterator
https://bugzilla.gnome.org/show_bug.cgi?id=727925
2014-05-03 23:11:35 -04:00
Nicolas Dufresne
aa74871080 v4l2: Use single pass iterator for M2M probe
Instead of having each M2M class do their own probing, use the
GstV4l2Iterator and probe all devices in a single pass.

https://bugzilla.gnome.org/show_bug.cgi?id=727925
2014-05-03 23:11:35 -04:00
Nicolas Dufresne
726fc3b524 v4l2: Add a common device enumerator
This will allow removing code duplication (hence bugs duplication).

https://bugzilla.gnome.org/show_bug.cgi?id=727925
2014-05-03 23:11:35 -04:00
Nicolas Dufresne
f7d34bd237 v4l2videodec: Simplify sub-instanciation mechanism
Simplify sub-instanciation by defining an absract type and using subtype
class and instance init callback. This also fixes a bug where the template
pads get initialized too late.

https://bugzilla.gnome.org/show_bug.cgi?id=727925
2014-05-03 23:11:34 -04:00
Nicolas Dufresne
e06c9f7fce v4l2: Cleanup plugin registration
There is no plan to introduce special sources for jpeg, te v4l2src works fine
for this.

https://bugzilla.gnome.org/show_bug.cgi?id=727925
2014-05-03 23:11:34 -04:00
Vincent Penquerc'h
81d2e9333d oss4: remove dead mixer code
This was partly removed in the port to 0.11. If still needed,
it's still there in the history.

Coverity 1139687
2014-05-02 09:41:19 +01:00
Vincent Penquerc'h
1062992b4a oss4: fix a missing unlock and a return-only-when-assertions-enabled
Spotted on the side while looking at another issue.
2014-05-02 09:33:51 +01:00
Nicolas Dufresne
7ff514fec6 v4l2: Correctly map RGB32 format
In v4l2 specification, RGB32 has the alpha, or pading, first, not last.
See http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html .

https://bugzilla.gnome.org/show_bug.cgi?id=540941
2014-04-30 15:36:07 -04:00
Tim-Philipp Müller
c9597298f9 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:35:17 +01:00
Sebastian Dröge
ab02b1db6c v4l2videodec: Initialise ioctl struct with zeroes before passing it to ioctl() 2014-04-16 17:23:52 +02:00
Edward Hervey
da39a0bae7 oss4: Maximum number of channels support is 8
Avoids doing potential overwrites in ch_layout (which only has 8
fields).

CID #1139826
2014-04-13 09:03:41 +02:00
Sebastian Dröge
7c006edf8d osxvideosink: Set rank to MARGINAL
If available we prefer using glimagesink over osxvideosink. It supports
more formats and in general has more features than osxvideosink.
2014-04-12 22:17:30 +02:00
Matthieu Bouron
7ac0204625 osxvideosink: use the video frame API instead of the video meta API
https://bugzilla.gnome.org/show_bug.cgi?id=726738
2014-04-08 13:56:10 +02:00
Matthieu Bouron
c6dcd3689d osxvideosink: advertize video meta API support
https://bugzilla.gnome.org/show_bug.cgi?id=726737
2014-04-08 13:55:53 +02:00
Nicolas Dufresne
e5ef2db489 v4l2: Fix support for caps without width, height, framerate or format
For format like mpegts, width and height is rarely in the negotiated caps. This
patch fixes failure when setting format, and prevent introducing width, height,
framerate and format to the caps when fixating.

https://bugzilla.gnome.org/show_bug.cgi?id=725860
2014-04-01 14:28:08 -04:00
William Manley
517f50f54f v4l2src: Fix support for mpegts streams
It seems that GStreamer's mpegts elements (tsdemux, tsparse) require caps
`video/mpegts,systemstream=true`.  As far as I can see the significance
of systemstream is to indicate that this is a container format rather than
an elementary stream.  As this is the case (and I can't understand how it
could not be the case with mpegts) I add systemstream=true to v4l2src's
caps.

This allows v4l2src to be linked with tsdemux for playback from my
Hauppauge HD-PVR with the pipeline:

    v4l2src ! queue ! tsdemux ! video/x-h264 ! decodebin ! xvimagesink

In combination with the next commit this fixes using Hauppauge HD-PVR with
GStreamer 1.0+.
2014-03-29 17:21:17 -04:00
Vincent Penquerc'h
4d0e1a4536 v4l2: attempt to fix infinite (for small version of infinite) loop 2014-03-29 17:09:02 -04:00
Rico Tzschichholz
f3caba6847 v4l2: fix distcheck
Make sure ext/*.h are dist'ed
2014-03-28 19:35:53 +00:00
Tim-Philipp Müller
39fc394254 ximagesrc: only extrapolate alpha mask for 32-bit depth
Instead of passing bogus alpha mask values when there's no alpha.

https://bugzilla.gnome.org/show_bug.cgi?id=726833
2014-03-27 16:32:13 -04:00
Nicolas Dufresne
0918662624 ximagesrc: Add ARGB/BGRA support 2014-03-27 15:10:12 -04:00
Olivier Crête
cfa5877899 v4l2: Implement GstDeviceMonitor subclass
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 20:37:54 -04:00
Olivier Crête
fdceedb77c v4l2: Remove GstPropertyProbe leftovers 2014-03-16 19:24:59 -04:00
Nicolas Dufresne
155d666845 v4l2: Add types compatiblity for other OS
Adds type compatiblity with other OS like BSD. This uses types mapping macro to
avoid conflict with existing defined types. We resuse glib types as these are
already available on supported platforms. This is GCC only because of the
le32 type that uses bitwise attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=726453
2014-03-16 17:32:03 +01:00
Nicolas Dufresne
0ad67fc404 v4l2: Fix typo V4L_DIR intead of V4L2_DIR 2014-03-15 18:41:16 +01:00
Nicolas Dufresne
478c9578f7 v4l2: Actually build the plugin
The checks were removed inadvertedly in previous patch and not replaced.
Re-introduce the configure checks and some of the checks in order to enable
this plugin again. We only check if videodev2.h exist on the platform to
avoid building on Windows or OSX, though we build against our own copy. This
was breaking the build on built-bot.
2014-03-15 16:48:08 +01:00
Nicolas Dufresne
11103c6c47 v4l2: Remove XV support
XV support for v4l2 never became upstream and ended up being
commented out with an undef for a long time now.
2014-03-15 13:54:47 +01:00
Nicolas Dufresne
418a4940a8 v4l2: Use a copy of videodev2.h header
With years the amount of ifdef have grown up and we are not even sure if the
old code path compiles. Each time we need to update the v4l2 framework to add
the new feature, we break compilation on older kernel. With exception of two
controls in the video orientation control, this patch get rid of all ifdef by
including the latest version of videodev2.h inside GStreamer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723446
2014-03-15 13:54:47 +01:00
William Manley
4f47442c7f v4l2: Fix typo contol -> control
https://bugzilla.gnome.org/show_bug.cgi?id=725632
2014-03-08 19:29:58 -05:00
William Manley
d3bd3ecc3e v4l2: Normalise control names in the same way as v4l2-ctl
V4L2 kernel drivers allow configuration of the hardware settings via a
mechanism called controls.  These can be referred to by name such as
"Brightness" and "White Balance Temperature".  The user-space command line
client for setting these controls (v4l2-ctl) normalises these names such
that they only contain lower case alphanumeric characters and the
underscore '_'.  e.g:

    Kernel                     v4l2-ctl
    ----------------------------------------------------
    Brightness                 brightness
    White Balance Temperature  white_balance_temperature
    Focus (absolute)           focus_absolute

GStreamer seems to want to follow this pattern but failed for controls with
more than one consecutive non-alphanum character.  e.g. GStreamer would
produce "focus__absolute_" rather than "focus_absolute".

This commit fixes that issue.  Backwards compatibility is preserved by
normalising all control names before comparison.

https://bugzilla.gnome.org/show_bug.cgi?id=725632
2014-03-08 19:27:54 -05:00
Thijs Vermeir
e96f0c03ef osxvideo: fix build on Mac OSX Mavericks and put new window in front
GetCurrentProcess/SetFrontProcess/TransformProcessType was deprecated
and now removed in Mac OSX 10.9. orderFrontRegardless is used to make
the video window the most front window.
2014-03-05 20:35:31 +01:00
Hugues Fruchet
a2d00122ed v4l2object: do not emit "parsed" caps for vp8
VP8 doesn't require parsing (vp8parse doesn't exist, so negotiation with demux fails
if "parsed" is set in caps).

https://bugzilla.gnome.org/show_bug.cgi?id=724636
2014-02-25 16:11:23 -05:00
Nicolas Dufresne
82f2bf052a v4l2: Don't require parser for VP8
Until GStreamer has one (see bug722760), we should not require a parser for VP8.

https://bugzilla.gnome.org/show_bug.cgi?id=722128
2014-02-25 14:29:11 -05:00
Nicolas Dufresne
a1db7e8c6c v4l2: CAPTURE_MPLANE is well tested now
https://bugzilla.gnome.org/show_bug.cgi?id=722128
2014-02-25 14:29:10 -05:00
Benjamin Gaignard
2a870d7d9b v4l2videodec: Create one element per device
For each videoCdevice probe it input/output capabilities
if it match with video decoder requirement register a new element.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>

https://bugzilla.gnome.org/show_bug.cgi?id=722128
2014-02-25 14:29:10 -05:00
Nicolas Dufresne
bd51c37196 v4l2videodec: Calculate latency from device information
Decoders or other devices that expose a minimum buffers required produce
an first output. We use this information to calculate latency.

https://bugzilla.gnome.org/show_bug.cgi?id=722128
2014-02-25 14:29:10 -05:00
Nicolas Dufresne
61183670c0 v4l2videodec: Implement v4l2videodec
Implement an element that can driver V4L2 M2M decoder device.

https://bugzilla.gnome.org/show_bug.cgi?id=722128
2014-02-25 14:29:10 -05:00
Mark Nauwelaerts
433d4f902d v4l2: make some more controls configurable
... at least if one tries hard enough using extra-controls property.
2014-02-23 13:06:43 +01:00
Mark Nauwelaerts
43a9c7652b v4l2src: handle old and odd driver behaviour when listing controls 2014-02-22 21:31:43 +01:00
Tim-Philipp Müller
5535a824a4 v4l2src: also unset INTERLACED flag on buffers if frame is not interlaced
https://bugzilla.gnome.org/show_bug.cgi?id=724899
2014-02-21 19:48:42 +00:00
Simon Farnsworth
b4820460d8 v4l2src: Flag interlaced buffers as interlaced.
We correctly indicate the field ordering on interlaced buffers, but fail to
flag them as containing interlaced video, which we need to do here because
we signal interlace-mode=mixed in our caps. This means that downstream
elements (like vaapipostproc from gstreamer-vaapi) don't recognise these
buffers as in need of deinterlacing.

Fix this by setting the interlaced flag on all interlaced buffers.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=724899
2014-02-21 19:48:06 +00:00
Thijs Vermeir
0de0a1f1db osxaudio: remove unused variables 2014-02-19 22:21:54 +01:00
Sebastian Dröge
4c01974ec1 oss4: Fix typo in header include guard
error: 'GST_OSS4_AUDIO_H' is used as a header guard here,
followed by #define of a different macro [-Werror,-Wheader-guard]
2014-02-08 17:25:27 +01:00
Edward Hervey
f56effbc81 osxvideo: Fix libtool usage
--tag=CC is needed for static build
2014-02-05 12:46:54 +01:00
Ryan Lortie
a46f667853 v4l2: guard use of ENODATA with #ifdef
Not all systems with v4l have ENODATA defined, so check that we have it
before attempting to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=722953
2014-01-25 18:51:41 +01:00
Michael Olbrich
3978f6ae6c v4l2: set GST_BUFFER_FLAG_DELTA_UNIT when appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=722394
2014-01-17 10:04:34 -05:00
Michael Olbrich
3d2bd4ff49 v4l2bufferpool: don't ref the newly created allocator
Otherwise the allocator will never be deleted.

https://bugzilla.gnome.org/show_bug.cgi?id=712612
2014-01-17 08:32:28 -05:00
Nicolas Dufresne
4cffae36e3 v4l2: Add NV12_64Z32 support
https://bugzilla.gnome.org/show_bug.cgi?id=722127
2014-01-14 16:51:52 -05:00
Justin Joy
c6d0f122c9 osshelper: Don't leak fd when getting card name
https://bugzilla.gnome.org/show_bug.cgi?id=722163
2014-01-14 11:28:31 +01:00
Vincent Penquerc'h
b80e3a4690 v4l2: fix build break using V4L2_CAP_VIDEO_M2M_MPLANE
This may not be defined. Since the previous version used
only the other define (V4L2_CAP_VIDEO_OUTPUT_MPLANE), fall
back on this only when not available.
2014-01-13 09:14:00 +00:00
Julien Isorce
55da3bc885 v4l2bufferpool: check set_config return value in gst_v4l2_buffer_pool_new
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:20:21 -05:00
Nicolas Dufresne
b39c838ece v4l2object: Add parsed=1 field for encoded output
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:20:21 -05:00
Nicolas Dufresne
5be7d39a3f v4l2object: Don't leak empty caps
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:20:21 -05:00
Julien Isorce
a54b34121f v4l2bufferpool: do not stop a stream not previously started
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:20:21 -05:00
Nicolas Dufresne
986e5b460d v4l2object: Don't enforce dimension field on encoded formats
Don't enforce having width, height and framerate in template caps for encoded
formats. These don't always need to be exposed and may break negotiation for
decoder and decoding sink. If needed, these field will be automatically added
when probed caps are known.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:20:21 -05:00
Julien Isorce
ba81eeb16b v4l2object: unref downstream pool
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:20:21 -05:00
Julien Isorce
c701dcd16c v4l2bufferpool: add gst_v4l2_buffer_pool_flush
STREAMOFF set all v4l2buffers to DEQUEUE state.

Then for CAPTURE we call QBUF on each buffer.
For OUTPUT the buffers are just push back in the GstBufferPool
base class 's queue.
But the loop actually looks like the same.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:20:21 -05:00
Benjamin Gaignard
062f4f8710 v4l2object: Add vp8 support
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
e017666645 v4l2object: Don't force framerate field for OUTPUT
If there is nothing that seems to force a certain framerate on output device, it is
preferable to simply not set that feild. This allow negotiation with tsdemux in a
decoder for example.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
97cf8f4d17 v4l2object: _v4l2fourcc_to_structure() can be static
This function is not used anymore outside v4l2object.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
fdd7bcc78c v4l2object: Add MPEG1/2 support
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
0c8ec43a12 v4l2object: Ask for a decent buffer size when dealing with encoded formats
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
86646ce03b v4l2bufferpool: On warn on size change if n_planes > 1
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Julien Isorce
79f2c06883 v4l2object: check if translated format is valid
Also add a FIXME in gst_v4l2_object_setup_format
to note that the whole function has to be improved
in order to support ENCODED formats.
It requires to have an encoder device which we do not
have right now.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
520dda092a v4l2object: Validate returned dimensions
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
61ce7b1a62 v4l2object: Ensure max is not smaller then min in decide_allocation
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
b261287745 v4l2object: Don't keep the max paramter when using our own pool
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
994c5d2c93 v4l2bufferpool: Respect the suggested min buffer
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
a77d2a64c1 v4l2object: Allocate pool if needed in decide_allocation
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
d79eea15fa v4l2object: Add V4L2_CID_MIN_BUFFERS_FOR_CAPTURE support
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
3cf85c9083 v4l2: Move decide allocation into v4l2object
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
34a8cb09c8 v4l2object: Implement _setup_format()
This method allow setting up the object from the currently configured format on the
device. This is useful for M2M element where input data decides the format that will
be set on capture side.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
41c37a2c6c v4l2object: Split out saving format from set_format()
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Julien Isorce
582f913667 v4l2object: set only one plane for encoded format
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
e2c32ec997 v4l2object: Move code block where it belongs
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:23 -05:00
Nicolas Dufresne
689672ef17 v4l2object: Don't check format specific information
The number of plane, and the stride does not represent a capability change. Same caps
can have different stride from the default GstVideoInfo and the number of planes will
never change for 1 format.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
5faa20b044 v4l2object: Move the extrapolation of stride at the right place
Now that we have a stride array, we should extrapolate only when
eeded (non multi-planar buffer).

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
5f1e47da24 v4l2object: Move back assertions where they should be
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
a64de44a0c v4l2object: Move mplane logic into gst_v4l2_object_get_caps_info()
It makes the gst_v4l2_object_set_format() slightly simplier and will make that
logic reusable. Note that gst_v4l2_object_has_mplane() will always return the
same value for one device. There is no need to check against the caps as this
has already been done by _open.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
4956b46bab v4l2object: Split _v4l2fourcc_to_video_format
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
e1be685c34 v4l2bufferpool: Request buffers only once
VIDIOC_REQBUFS allocates buffer, it has no place inside set_config. Also, some driver do
no allow multiple calls to this ioctl.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
b80169a16a v4l2object: Don't validate dimension for encoded format
We set the dimensions just in case but don't validate them
afterwards. For some codecs the dimensions are *not* in the
bitstream, IIRC VC1 in ASF mode for example.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
4a85f90c79 v4l2object: Quirks for dev without initial format
Most M2M have undefined behaviour initially when VIDIOC_G_FMT is called.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
080f58166e v4l2object: Add gst_v4l2_object_open_shared()
https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
cf32d6ec43 v4l2object: Implement gst_v4l2_dup()
This will duplicated the FD from another object and copy over the probed result.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
7fd6dc08b9 v4l2object: make IO_MODE enum public
This is to allow adding a second io-mode property on M2M device like decoder so
input and output can be controlled separatly.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
203e245134 v4l2: better handle quirks activation
This way we can activate deactivate those quirks all at once at one
place.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
092e7605d3 v4l2: Fix h264 caps
V4L2_PIX_FMT_H264 is documentated as byte-stream (with start code). The ensure proper
negotiation with element like h264parse.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Nicolas Dufresne
e821de3494 v4l2object: Split caps in different categories
This is need to correctly expose capabilities on specialized devices
like decoders and encoders.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:13 -05:00
Sebastian Rasmussen
3f8b423516 v4l2: Handle v4l2_ioctl() errors even in error handling
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=721268
2014-01-03 10:59:57 +01:00
Jeremy Huddleston Sequoia
2bc631bcd0 osxvideo: unifdef -DRUN_NS_APP_THREAD 2014-01-02 10:01:54 +01:00
Jeremy Huddleston Sequoia
6fe2115d77 osxvideo: Assume SDK and deployment target are at least Snow Leopard 2014-01-02 10:01:28 +01:00
Sebastian Dröge
5b1c0a4cfd osx: Make OSX version checks more consistent
And especially also consider update versions, e.g. 10.5 with updates
will be 1051 or similar and thus bigger than MAC_OS_X_VERSION_10_5 but
still won't have the API we want to use.
2013-12-31 10:11:24 +01:00
Jeremy Huddleston
3d163680f0 osxvideosink: Fix build on updated OS X Leopard
https://bugzilla.gnome.org/show_bug.cgi?id=721245
2013-12-31 10:11:24 +01:00
Alessandro Decina
fdf8ac40d8 osxvideosink: fix segfault when dealing with padded frames
Fixes crashes with vtdec ! osxvideosink where VideoToolbox outputs padded UYVY
2013-12-08 16:51:00 +01:00
Julien Isorce
3c70741e45 v4l2bufferpool: add support for multi-planar V4l2 API in DMABUF mode
Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-12-04 09:28:25 +00:00
Julien Isorce
303cec48db v4l2: refactor by emulating one v4l2_plane in non-MPLANE mode
so that the buffer informations can be retrieved the same way
in both MPLANE and non-MPLANE mode.

Here "emulating" means "manually fill in the plane".

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-12-04 09:28:08 +00:00
Julien Isorce
61ae84b50d v4l2: add support for multi-planar V4L2 API
This api is in linux kernel since version 2.6.39,
and present in all version 3.

The commit that adds the API in master branch of the
linux kernel source is:
f8f3914cf9

v4l2 doc: "Some devices require data for each input
or output video frame to be placed in discontiguous
memory buffers"

There are newer structures 'struct v4l2_pix_format_mplane'
and 'struct v4l2_plane'.
So the pixel format is not setup with the same API when using
multi-planar.

Also for gst-v4l2, one of the difference is that in GstV4l2Meta
there are now one mem pointer for each maped plane.

When not using multi-planar, this commit takes care of keeping
the same code path than previously. So that the 2 cases are
in two different blocks triggered from V4L2_TYPE_IS_MULTIPLANAR.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-12-04 09:27:20 +00:00
Nicolas Dufresne
90ac945dcc v4l2object: Use space instead of tabs
https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-11-25 13:44:50 -05:00
Nicolas Dufresne
f18290226a v4l2object: Fix header indentation so it's readable again
It's unfortunate to have to do this, but with the mix of tabs and space, plus all the random
indentation this header has become very hard to read.

https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-11-25 13:44:35 -05:00
Michael Olbrich
f8f2fc3e86 v4l2: clear cached caps on close
A different device with different caps may be used for the next open.

https://bugzilla.gnome.org/show_bug.cgi?id=712611
2013-11-21 14:14:24 -05:00
Tim-Philipp Müller
d506409af5 docs: get rid of 'Since: 0.10.x' markers
And some gtk-doc markup fixes.
2013-11-18 14:47:35 +00:00
Marc Leeman
be01e80e6b v4l2object: print FOURCC_FORMAT when enumerating
https://bugzilla.gnome.org/show_bug.cgi?id=712206
2013-11-13 13:52:49 +01:00
Marc Leeman
bc87f39a90 v4l2: init v4l2_buffer to 0x0 before ioctl
https://bugzilla.gnome.org/show_bug.cgi?id=712137
2013-11-12 13:08:33 -05:00
Andoni Morales Alastruey
619f4f5c5a osxaudiosink: fix segfault when we can't get the channels layout 2013-11-07 00:53:48 +01:00
Matthieu Bouron
d57b9628fc osxvideosink: fix missing selector name warnings
The spaces matter in ObjC

https://bugzilla.gnome.org/show_bug.cgi?id=711013
2013-10-28 14:40:16 +00:00
Peter Korsgaard
94f3d6fc07 v4l2bufferpool: O_CLOEXEC needs _GNU_SOURCE
On some systems (E.G. uClibc and older Glibc versions), O_CLOEXEC is only
defined when _GNU_SOURCE is specified, so do so.

_GNU_SOURCE needs to be defined before any system headers are included,
so move the fcntl.h section up.

https://bugzilla.gnome.org/show_bug.cgi?id=709423
2013-10-04 14:33:43 +02:00
Tim-Philipp Müller
51ff79842d v4l2src: print probed caps as caps again in debug log
This got lost during refactoring.
2013-10-03 18:33:01 +01:00
Andoni Morales Alastruey
05f6c094fa osxvideosink: fix segfault releasing the sink
show_frame is deferred to the main thread and can be called
when the sink has been released, so we need to keep an extra ref
on ObjectiveC object helper.

https://bugzilla.gnome.org/show_bug.cgi?id=708501
2013-09-24 09:59:51 +02:00
Robert Krakora
141a1fc296 v4l2bufferpool: Restore original GstMemory in buffer if it has been changed
https://bugzilla.gnome.org/show_bug.cgi?id=706083
2013-09-23 11:58:39 -04:00
Olivier Crête
19021e7176 v4l2: Remove commented out line 2013-09-19 17:39:17 -04:00
Olivier Crête
d1e16f7b0c v4l2bufferpool: dmabuf is not a singleton anymore
https://bugzilla.gnome.org/show_bug.cgi?id=707793
2013-09-18 15:13:59 -04:00
Mathieu Duponchelle
374a97a3e9 v4l2: Use newly #defined metadata names. 2013-09-09 15:39:17 +02:00
Sebastian Dröge
478f0dcfe7 v4l2bufferpool: Fix missing condition in previous commit 2013-09-09 14:46:42 +02:00
Sebastian Dröge
1e7c3e4520 v4l2bufferpool: Also fix strides for other semi-planar video formats 2013-09-09 14:45:55 +02:00
Andreea Fulger
78adf28a61 v4l2bufferpool: Fix stride for NV12/NV21
https://bugzilla.gnome.org/show_bug.cgi?id=707758
2013-09-09 14:45:55 +02:00
Tim-Philipp Müller
1dfc1f2686 Don't use setlocale in plugins()
Only apps should call setlocale(), not libraries.
2013-09-01 21:18:38 +01:00
Sebastian Dröge
7692e9e569 directsoundsink: WAVEFORMATEX is unsigned for 8 bit integers, and signed for others
Probably fixes
https://bugzilla.gnome.org/show_bug.cgi?id=705477
2013-08-21 16:41:21 +02:00
Olivier Crête
d595c08aca v4l2: Add forward declaration for gst_v4l2_object_get_format_list 2013-08-19 13:19:42 -04:00
Olivier Crête
48caa1712a v4l2: De-duplicate caps probing between src and sink 2013-08-19 13:08:18 -04:00
Olivier Crête
24286f1612 v4l2: Use G_DEFINE_ macros for added thread safety 2013-08-19 12:48:35 -04:00
Tim-Philipp Müller
fdddc35f20 v4l2: remove unused enumtypes and use generic marshaller 2013-08-04 11:03:49 +01:00
Alessandro Decina
0df7af07ce osxaudiosink: intersect the probed caps with the filter passed to get_caps() 2013-07-25 08:24:45 +02:00
Andoni Morales Alastruey
fbafca49f8 osxvideosink: warn about the future deprecation of the "embed" property 2013-07-17 13:29:42 +02:00
Andoni Morales Alastruey
d57ef52cad osxvideosink: defer the window handle setup to the main thread 2013-07-10 17:43:00 +02:00
Andoni Morales Alastruey
34a5b93637 osxvideosink: default to the main in case we are not setup yet 2013-07-10 17:43:00 +02:00
Andoni Morales Alastruey
0e321b87d4 osxvideosink: close the internal window correctly 2013-07-10 17:43:00 +02:00
Andoni Morales Alastruey
213fa3af0d osxvideosink: only create the NS app thread for Cocoa once
The helper thread for Cocoa, in case no NS run loop is running,
should be started only once and shared across all the instances
running
2013-07-10 17:42:59 +02:00
Michael Olbrich
07e4dd3424 v4l2: bufferpool: don't forget to release buffer on error
If the pool is stopped while gst_v4l2_buffer_pool_dqbuf() waits for a
buffer then the return value is GST_FLOW_FLUSHING. In this case the buffer
to queue must also be released. Otherwise is will never be deleted or
returned to its pool.

https://bugzilla.gnome.org/show_bug.cgi?id=703764
2013-07-08 16:27:19 +02:00
Michael Olbrich
5c99fefa04 v4l2: don't extract data from caps twice
gst_video_info_from_caps() always extract width, height, interlace mode and
framerate now. It is no longer necessary to do it again for encoded
formats.

https://bugzilla.gnome.org/show_bug.cgi?id=703399
2013-07-02 10:08:46 +02:00
Tim-Philipp Müller
c03efd3894 ximagesrc: clear dts on buffer acquired from pool
When setting timestamps on outgoing buffers, clear the
dts explicitly, otherwise it may end up being set to a
bogus value from last time it was used. Avoids every
second or so buffer's dts being set to 0. Not that it
should matter for raw video.
2013-06-21 00:47:06 +01:00
Wim Taymans
821d99a503 v4l2: don't redefine the PERFORMANCE debug variable
It is already defined in core.

fixes https://bugzilla.gnome.org/show_bug.cgi?id=702732
2013-06-20 15:35:11 +02:00
Sjoerd Simons
8e43c0ec9e v4l2: Optimize negotiation by removing the query filter
As cameras tend to have a quite specific set of capabilities (specific
framerates for each resolution), getting the peer caps filtered by our
probed caps can cause a big increase in the caps size which slows down
things quire a bit.

As for negotiation v4l2 iterates through the caps of the peer to find the
first intersection with the probed caps, getting the fully expanded
intersection of capabilities is not useful.

Using the same testcase as for bug #702632, adding this patch on top of
the patches suggested there speeds up getting the inital frame from
around ~14-15 seconds to around ~3-4 seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=702638
2013-06-19 15:05:25 +02:00
Andoni Morales Alastruey
025f226e60 osxvideosink: fix support in VM's without hardware acceleration 2013-06-18 10:41:37 +02:00
Michael Olbrich
a1c34b5407 v4l2: make sure the element is not deleted before the pool
The pool accesses data from the v4l2object so it must exist at least
as long as the pool. Refcount the element which controls the object
live-time.

https://bugzilla.gnome.org/show_bug.cgi?id=701650
2013-06-07 20:07:42 +02:00
Michael Olbrich
0769a78dd1 v4l2: iterate controls with V4L2_CTRL_FLAG_NEXT_CTRL if possible
In v2.6.18 control classes where added to the v4l2 API.
Iterating over CIDs starting with V4L2_CID_BASE will only find controls for
the first control class.
By iterating with V4L2_CTRL_FLAG_NEXT_CTRL all controls are found.

This is necessary to make controls from other control classes available in
the extra-controls property.

If V4L2_CTRL_FLAG_NEXT_CTRL is not defined at compile time or not supported
at runtime then the old mechanism for iterating is used.

https://bugzilla.gnome.org/show_bug.cgi?id=701540
2013-06-05 13:00:21 +02:00
Michael Olbrich
74d217c44b v4l2: improve pixel aspect ratio handling
Instead of just assuming a aspect ratio of 1/1 use VIDIOC_CROPCAP to ask
the device.
This also add a pixel-aspect-ratio property to overwrite the value from the
driver and a force-aspect-ratio property to ignore it.

https://bugzilla.gnome.org/show_bug.cgi?id=700285
2013-06-04 17:37:15 +02:00
Stirling Westrup
86405d6ee7 v4l2: Fix compilation with older kernels
https://bugzilla.gnome.org/show_bug.cgi?id=701595
2013-06-04 17:04:11 +02:00
Michael Olbrich
3417a791ac v4l2: call VIDIOC_REQBUFS with count = 0 in pool_finalize
Without this the following sequence fails:

- set_caps()
  - object_stop() (does nothing)
  - set_format() -> VIDIOC_S_FMT
- set_config() -> VIDIOC_REQBUFS with count = N
- set_caps()
  - object_stop()
    - pool_finalize()
  - set_format() -> VIDIOC_S_FMT => EBUSY

Usually the pool is started after set_config(), in which case object_stop()
will result in a pool_stop and therefore VIDIOC_REQBUFS with count = 0 but
that is not guaranteed.
Also calling VIDIOC_REQBUFS with count = 0 in pool_finalize() if necessary
fixes this problem.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701543
2013-06-04 10:45:06 +02:00
Michael Olbrich
496995a7d5 v4l2: rework sink buffer refcounting
This is a followup patch for #700781, which is not quite correct.
The buffer handling is quite complicated here.
The original code intended to the the following:

- gst_v4l2_buffer_pool_process() calls QBUF and adds the buffer to the
  local list.
- The sink calls gst_buffer_unref() which returns the buffer to the pool
  but not the 'free list'.
- Some time later DQBUF returns the buffer and
  gst_v4l2_buffer_pool_release_buffer() puts in on the 'free list'.

If the buffer must be copied then (parent_class)->acquire_buffer() is
called directly to keep the buffer in the pool.

This has two problems:
1. If gst_v4l2_buffer_pool_release_buffer() is called before the buffer is
   returned to the pool, then the buffer is put on the 'free list' twice.
   This can happen if a reference to the buffer is kept outside the sink,
   of if DQBUF returns the buffer, that was just queued with QBUF.
2. If buffers are copied, then all buffers are in the pool at all times. As
   a result gst_v4l2_buffer_pool_stop() and gst_v4l2_buffer_pool_dqbuf()
   can access pool->buffers at the same time, which can lead to memory
   corruption.

The patch for #700781 fixes those problems, but with the side effect that
there are always buffers outside the pool (because they are queued) and
the pool is never stopped.
This patch fixes this by releasing the reference to the buffer after
handling it (to avoid problem 2.) so it can be returned to the pool.
gst_v4l2_buffer_pool_release_buffer() is only called if the buffer is
already in the pool (to avoid problem 1.).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701375
2013-06-03 11:55:48 +02:00
Sebastian Dröge
82e7826af0 v4l2: Only conditionally use V4L2_CTRL_TYPE_INTEGER_MENU, it's not available in older versions 2013-05-29 20:35:41 +02:00
Michael Olbrich
0fb59275b0 v4l2: add a property for arbitrary v4l2 controls
This makes it possible to set any controls that can be set with
VIDIOC_S_CTRL.
The controls are set when the property is set (if the device is open)
and when the device is opened.

https://bugzilla.gnome.org/show_bug.cgi?id=698837
2013-05-29 20:18:11 +02:00
Michael Olbrich
f9cc655adf v4l2: keep a reference to all queued buffers
Without this, a queued buffer may be required, filled and queued before it
is dequeued.
Calling gst_buffer_pool_acquire_buffer() ensures that the buffer is set up
correctly and gst_buffer_unref() calls buffer_release().

https://bugzilla.gnome.org/show_bug.cgi?id=700781
2013-05-21 16:44:58 +02:00
Michael Olbrich
00ffe41e6a v4l2: Don't stop streaming when set_caps is called with unchanged caps
This can happen if other parts of the pipeline are reconfigured.
Stop streaming even for a short amount of time can be quite visible, so it
should be avoided if possible.

https://bugzilla.gnome.org/show_bug.cgi?id=700503
2013-05-20 11:13:18 +02:00
Michael Olbrich
57c0f4d6b5 v4l2: only add interlace-mode to the caps for raw formats
https://bugzilla.gnome.org/show_bug.cgi?id=700280
2013-05-14 13:01:27 +02:00
Michael Olbrich
16b0fd5ad9 v4l2: copy and set the actual size of the content
https://bugzilla.gnome.org/show_bug.cgi?id=700282
2013-05-14 12:57:14 +02:00
Michael Olbrich
113b60935a v4l2: request 0 buffers when stopping
Without this stopping the pool in *_set_caps() is useless.
S_FMT will still fail with EBUSY.

https://bugzilla.gnome.org/show_bug.cgi?id=699835
2013-05-07 16:39:41 +02:00
Philipp Zabel
59d7d5c6bb v4l2: fill out v4l2_buffer.bytesused field for v4l2sink
When queuing a buffer for a sink, bytesused must contain the actual
amount of data.

For a source, the driver must overwrite this, so it doesn't matter
what is set here.

https://bugzilla.gnome.org/show_bug.cgi?id=699598
2013-05-04 11:19:14 +01:00
Michael Olbrich
53da901cc9 v4l2: always generate video info from caps
In the past gst_video_info_from_caps() only video/x-raw. Now it also
supports other video/* and image/* formats.
With this patch the format won't be GST_VIDEO_FORMAT_UNKOWN and
gst_v4l2_buffer_pool_set_config() handles strides correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=699570
2013-05-03 13:14:58 +02:00
Michael Olbrich
1e777ede92 v4l2: try to allocate new buffers with VIDIOC_CREATE_BUFS if needed
If max_buffers is 0 then an arbitrary number of buffers (currently 4) is
allocated. If this is not enough v4l2src starts copying buffers.
With this patch VIDIOC_CREATE_BUFS is used to allocate a new buffer. If
this fails v4l2src falls back to copying buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=699447
2013-05-03 11:18:04 +02:00
Andoni Morales Alastruey
bb980775f8 osxvideosink: fix setting window handle after transition
The destroyed flag was not reset properly and it's also not needed
as we can check osxwindow != NULL
2013-05-02 14:03:43 +02:00
Michael Olbrich
eebe5fc70d v4l2: fix and cleanup VIDIOC_EXPBUF handling
clear the struct, and provide a correct error message

https://bugzilla.gnome.org/show_bug.cgi?id=699337
2013-05-01 15:40:55 +02:00
Philipp Zabel
4d3f6850ca v4l2: handle return value -ENOTTY for unimplemented VIDIOC_G_PARM
Newer kernels return -ENOTTY, older kernels return -EINVAL if the ioctl
is not implemented. With this patch, GStreamer handles both cases.

https://bugzilla.gnome.org/show_bug.cgi?id=698825
2013-05-01 15:34:50 +02:00
Michael Olbrich
bf3a0b7e37 v4l2: fix broken boolean expression to detect non-frame buffers
https://bugzilla.gnome.org/show_bug.cgi?id=699294
2013-04-30 11:47:09 +02:00
Michael Olbrich
d4126ff986 v4l2: also poll for output devices
Note that the V4L2 API defines that for output devices POLLOUT
indicates that a buffer is ready to be dequeued.

https://bugzilla.gnome.org/show_bug.cgi?id=698992
2013-04-27 09:31:29 +01:00
Philipp Zabel
fd0123800c v4l2: fix copying of encoded buffers
The existence of a GstVideoFormatInfo does not guarantee, that
the buffer contains video frames, so the format must be checked.

Also, for encoded buffers the length is variable and must be set.

https://bugzilla.gnome.org/show_bug.cgi?id=698949
2013-04-26 15:36:49 +02:00
Michael Olbrich
3466796f10 v4l2: add support for mpeg4 and H.263
https://bugzilla.gnome.org/show_bug.cgi?id=698826
2013-04-26 14:26:15 +02:00
Philipp Zabel
305023fe9d v4l2: handle ENODATA return value for VIDIOC_ENUMSTD
In kernel v3.7-rc1, VIDIOC_ENUMSTD returns ENODATA if the current input
does not support the STD API.

https://bugzilla.gnome.org/show_bug.cgi?id=698827
2013-04-25 15:40:59 +02:00
Michael Olbrich
2e80c0d2c0 v4l2: bufferpool: reset buffer size in release_buffer
The buffer might still be in use elsewhere when dequeuing buffers for
outputs.

https://bugzilla.gnome.org/show_bug.cgi?id=698822
2013-04-25 12:34:24 +02:00
Michael Olbrich
8f9cc96a69 v4l2: bufferpool: remove unused includes
The hacks that needed these are long gone.

https://bugzilla.gnome.org/show_bug.cgi?id=698821
2013-04-25 11:30:48 +01:00
Todd Agulnick
a30634a248 osxaudio: Use gst_audio_channel_positions_to_mask() to create mask
https://bugzilla.gnome.org/show_bug.cgi?id=698807
2013-04-25 09:57:26 +02:00
Todd Agulnick
e7710c2655 osxaudio: Remove unused code 2013-04-25 09:56:57 +02:00
Diogo Carbonera Luvizon
0a7d4afc1b v4l2: save the format correctly
If TRY_FMT is not implemented,  gst_v4l2_object_get_nearest_size will
use S_FMT and will change the device's operation mode. To save the
old device mode we need to set the type field or else it will fail
to save the previous format.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685209
2013-04-24 16:00:24 +02:00
Sebastian Dröge
3230182a61 osxaudio: Include gstaudioringbuffer.h to fix compilation in 1.0 2013-04-18 09:37:30 +02:00
Philippe Normand
d352201a34 osxaudiosink: channel-mask configuration fixes
Set channel-mask according to sink's layout in case of stereo layout.
Also initialize and reset the mask when an unrecognized channel is detected.

https://bugzilla.gnome.org/show_bug.cgi?id=698224
2013-04-18 09:16:19 +02:00
Olivier Crête
b5a9ed20e1 v4l2src: Disable renegotiation in the negotiate method
This way, we don't block the initial negotiation.

Thanks to Jeremy Whiting for doing all the testing.

https://bugzilla.gnome.org/show_bug.cgi?id=695981
2013-04-17 17:04:11 -04:00
Olivier Crête
3340baa374 Revert "v4l2: disable renegotiation"
This reverts commit d1b26e1d59.

This causes the initial negotiation to never happen if a reconfigure
event is received after gst_base_src_start_complete() but before the loop
starts.

https://bugzilla.gnome.org/show_bug.cgi?id=695981
2013-04-17 17:02:08 -04:00
Sebastian Dröge
27248393e4 osxaudio: Fix merge conflicts 2013-04-17 20:24:48 +02:00
Sebastian Dröge
2b1f967101 osxaudioringbuffer: First check the type, then cast 2013-04-17 09:52:14 +02:00
Takashi Nakajima
ce5246ed71 osxaudio: use GST_IS_OSX_AUDIO_SINK in ring buffer. 2013-04-17 09:52:14 +02:00
Takashi Nakajima
efda79b084 osxaudio: call set_channel_positions() in osxaudioringbuffer acquire() 2013-04-17 09:52:14 +02:00
Todd Agulnick
c2c85a094a osxaudio: use GST_AUDIO_INFO_* accessors
Changes include the following:

 * Update classname references
 * Replace GST_BOILERPLATE_FULL with G_DEFINE_TYPE
 * Use new GstAudioInfo struct and methods
 * Use new buffer memory allocation scheme

Conflicts:
	sys/osxaudio/gstosxaudioringbuffer.c
2013-04-17 09:52:13 +02:00
Todd Agulnick
ed94ef79f9 osxaudio: adjust for changes to glib mutex api. 2013-04-17 09:52:13 +02:00
Takashi Nakajima
09e980d2c9 osxaudio: try to fix up according to Sebastian's comments 2013-04-17 09:52:13 +02:00
Philippe Normand
ab64837bf2 osxaudio: build fixes
Enable the osxaudio plugin build in configure.ac and fix some
include directive order issues.
2013-04-17 09:52:13 +02:00
ted-n
d5d53ec611 osxaudio: fix layout for osxaudiosrc 2013-04-17 09:52:13 +02:00
ted-n
b217b6fdfb osxaudio: port to v.1.0 2013-04-17 09:52:13 +02:00
Andoni Morales Alastruey
baa23d314d osxvideosink: fix segfault accessing osxwindow when not set yet 2013-04-16 14:54:06 +02:00
Sebastian Dröge
b0b0557c48 gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00
Josep Torra
0d6602eaaf osxaudio: Fixes error: "GST_LEVEL_DEFAULT" redefined 2013-04-15 08:41:34 +02:00
Josep Torra
220a9ff102 osxaudio: fixes implicit declaration of function 'getpid' 2013-04-15 08:41:28 +02:00
Todd Agulnick
a30476497f osxvideo: include pthread.h to fix compiler warning
https://bugzilla.gnome.org/show_bug.cgi?id=697303
2013-04-05 09:34:23 +01:00
Wim Taymans
14300e5805 v4l2: free all queued buffers
Don't just loop over the first num_queued buffers but loop over
all the buffers and check if they need to be freed. It is possible that
not all buffers are queued and then the entry in our array will be NULL.
Those buffers that are not queued were freed in stop().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696651
2013-04-03 11:14:41 +02:00
Wim Taymans
0dfc88d893 v4l2: improve debug 2013-04-03 11:14:41 +02:00
Tim-Philipp Müller
60302a57a4 v4l2: fix printf format compiler warning in debug message 2013-04-02 23:36:22 +01:00
Sebastian Dröge
78acb51dc8 directsoundsink: Check for a subset instead of non-empty intersection in accept-caps 2013-03-26 14:44:36 +01:00
Sebastian Dröge
4f58287aca directsoundsink: Properly handle the filter caps in get_caps() 2013-03-26 14:40:16 +01:00
Sebastian Dröge
0265b0f6a3 directsoundsink: Don't unnecessarily get the parent class in class_init
The trampoline generated by G_DEFINE_TYPE does that already.
2013-03-26 14:40:16 +01:00
Bastien Nocera
8e633d2059 v4l2: fix compilation against newer kernel headers as on FC19 2013-03-18 14:59:35 +00:00
Andoni Morales Alastruey
c853d8dac0 osxaudio: add support for iOS using the RemoteIO AudioUnit 2013-03-08 12:13:56 +01:00
Andoni Morales Alastruey
9621074006 osxaudio: add a façade for the CoreAudio API 2013-03-08 12:13:55 +01:00
Benjamin Gaignard
e29ab42922 v4l2: Add support of dmabuf
v4l has add a new IOCTL to export a buffer by using dmabuf.
This patch allow to use this new IOTCL if it has been defined in videodev2.h
I introduce a new IO mode (GST_V4L2_IO_DMABUF) to enable this way of working.

https://bugzilla.gnome.org/show_bug.cgi?id=693826
2013-02-19 12:57:07 +01:00
Benjamin Gaignard
59e583b59f v4l2: don't check stride for encoded formats
Don't try to check the stride for encoded formats. Some drivers output
something != 0 and then we don't want to fail on that.
2013-02-15 16:23:23 +01:00
Alexey Chernov
63235d1054 osxvideosink: Make GstNavigation key input events in osxvideosink compatible with x(v)imagesink ones 2013-01-31 11:44:22 +01:00
Olivier Crête
a31649e357 ximagesrc: Set the pixel aspect ratio correctly in the caps 2013-01-23 21:35:25 -05:00
Sjoerd Simons
00eed11d6a v4l2: Re-enable prepare-format emission
With the port to gstreamer 1.0 the prepare-format signal stopped being
emitted. Start emitting this again for use in uvch264src.  While there
change the emission to include the caps for extra flexibility instead of
fource, width, height.

https://bugzilla.gnome.org/show_bug.cgi?id=692042
2013-01-23 21:06:16 -05:00
Alexey Chernov
a8fe984d65 osxvideosink: Fix crash in osxvideosink with external window output 2013-01-16 11:43:56 +01:00
Alexey Chernov
77fde4b8ba osxvideosink: Make GstGLView propagate input events to its parent view
Fixes bug #691832
2013-01-16 11:38:16 +01:00
Robert Krakora
ad2f74afbc v4l2: Also handle the new ENOENT return value of VIDIOC_QUERYCTRL
https://bugzilla.gnome.org/show_bug.cgi?id=691098
2013-01-04 10:04:26 +01:00
Tim-Philipp Müller
644c939fcb oss4sink: notify "volume" property on open to make apps query initial volume
The initial volume might not be the property default, so
emit a notify on the volume property to make apps get
an up-to-date reading of the current volume.

https://bugzilla.gnome.org/show_bug.cgi?id=631053
2012-12-25 16:52:19 +00:00
Koop Mast
0bcf8ecd93 v4l2: Teach where the videodev2.h header lives on freebsd.
https://bugzilla.gnome.org/show_bug.cgi?id=690233
2012-12-17 11:17:01 +01:00
Руслан Ижбулатов
fc81ddc8ee directsound, waveform: fix compilation errors caused by circular includes
https://bugzilla.gnome.org/show_bug.cgi?id=690124
2012-12-12 22:42:51 +00:00
Sebastian Dröge
0726b71ceb ext/sys: Fix some compilation errors caused by circular includes 2012-12-12 17:35:04 +00:00
Alexey Chernov
d4622c974f osxvideosink: Fix resizing the Cocoa window on receiving new caps
Fixes bug #689732.
2012-12-10 11:45:10 +00:00
Tim-Philipp Müller
527c218533 v4l2src: link against -lrt for clock_gettime()
Need to explicitly link against -lrt for clock_gettime(), which
we don't get in the libs any more, because core moved the
gmodule-no-export-2.0 bit into Requires.Private.

Not required for newer glibc, but for older ones, so check for that.
2012-11-30 23:18:12 +00:00
Tim-Philipp Müller
e672123621 v4l2: remove unused define 2012-11-25 16:05:11 +00:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Michael Smith
b04b1b5089 meta info: threadsafe registration using g_once 2012-10-03 10:51:45 -07:00
Sjoerd Simons
5d1ed54814 v4l2src: handle latency query before setting up the bufferpool
Fixes crash if no bufferpool is set up yet.

https://bugzilla.gnome.org/show_bug.cgi?id=684430
2012-09-20 13:49:42 +01:00
Arun Raghavan
c9821d31f8 osxaudiosink: Specify endianness in IEC 61937 payloading
Corresponds to an API change in gst-plugins-base. This needs to be fixed
to query the expected byte order using appropriate API.

https://bugzilla.gnome.org/show_bug.cgi?id=678021
2012-09-19 09:18:19 +05:30
Arun Raghavan
333d568ec7 directsoundsink: Specify endianness in IEC 61937 payloading
DirectSound expects native endian byte order.

https://bugzilla.gnome.org/show_bug.cgi?id=678021
2012-09-19 09:18:19 +05:30
Mark Nauwelaerts
3a7b7efe99 replace _get_caps_reffed with _get_caps 2012-09-14 17:55:16 +02:00
Wim Taymans
e6ce9c226f v4l2: remove unused properties 2012-09-13 10:56:27 +02:00
Wim Taymans
d1b26e1d59 v4l2: disable renegotiation
We can't yet wait for the bufferpool to DRAIN before starting renegotiation so
disable it for now.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=682770
2012-09-11 15:41:10 +02:00
Mark Nauwelaerts
fd162372f1 directsoundsink: port to the new GLib thread API 2012-09-11 12:54:41 +02:00
Wim Taymans
497ff16355 update for audio base src api change 2012-09-10 11:32:25 +02:00
Wim Taymans
d154743949 v4l2: remove unused code. 2012-09-06 10:43:52 +02:00
Tim-Philipp Müller
4bb52bbadf docs: gst-launch -> gst-launch-1.0 and ffmpegcolorspace -> videoconvert 2012-08-27 21:20:30 +01:00
Martin Ertsaas
7fcbf88ced osxvideosink: Make osxvideosink use the non-deprecated threading api from glib.
https://bugzilla.gnome.org/show_bug.cgi?id=682446
2012-08-22 11:09:55 +01:00
Huacai Chen
05d4f81834 v4l2: make gst_v4l2_fill_lists() adapt to kernel 3.3+
When do v4l2_ioctl() with VIDIOC_ENUMINPUT fails on some devices,
kernels before 3.3.0 return EINVAL, but newer kernels return ENOTTY.
This patch make those devices work well on kernel 3.3+.

Related kernel commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=07d106d0a33d6063d2061305903deb02489eba20

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Rui Wang <wangr@lemote.com>
Signed-off-by: Jie Chen <chenj@lemote.com>
2012-08-21 23:09:33 +01:00
Matthias Clasen
9f2aa8d47f v4l2: fix build with recent kernels, the v4l2_buffer input field was removed
This was unused apparently and removed in the kernel in commit:

 From 2b719d7baf490e24ce7d817c6337b7c87fda84c1 Mon Sep 17 00:00:00 2001
 From: Sakari Ailus <sakari.ailus@iki.fi>
 Date: Wed, 2 May 2012 09:40:03 -0300
 Subject: [PATCH] [media] v4l: drop v4l2_buffer.input and V4L2_BUF_FLAG_INPUT

 Remove input field in struct v4l2_buffer and flag V4L2_BUF_FLAG_INPUT which
 tells the former is valid. The flag is used by no driver currently.

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

Conflicts:
	sys/v4l2/gstv4l2bufferpool.c
2012-08-09 08:40:33 +01:00
Tim-Philipp Müller
787c314ec3 Silence some 'variable may be used uninitialized' compiler warnings
When compiling with -DG_DISABLE_ASSERT
2012-08-08 11:31:59 +01:00
Andoni Morales Alastruey
6b7f165190 osxvideosink: add a better detection for the main run loop 2012-08-06 10:59:09 +02:00
Xavi Artigas
ec2e962323 directsoundsink: Do not overwrite the DS buffer when testing for AC3 support
https://bugzilla.gnome.org/show_bug.cgi?id=680706

Conflicts:
	sys/directsound/gstdirectsoundsink.c
2012-08-06 10:59:01 +02:00
Wim Taymans
2052cabdc4 fix for allocator API changes 2012-07-09 16:28:41 +02:00
Wim Taymans
16b8e2d171 update for query api changes 2012-07-06 11:50:50 +02:00
Wim Taymans
8eadb9c12c update for query api changes 2012-07-06 11:26:46 +02:00
Wim Taymans
77813e67e1 update for allocation query changes 2012-07-06 11:05:11 +02:00
Руслан Ижбулатов
b64849550d directsoundsink: Fix query function implementation; more debugging 2012-07-04 19:54:55 +02:00
Руслан Ижбулатов
dc2ce73a3e directsoundsink: Fix spec stuff in directsoundsink 2012-07-04 19:54:55 +02:00
Andoni Morales Alastruey
c38fa466c3 directsoundsink: fix access to invalid pointer in set_volume 2012-07-04 19:54:55 +02:00
Sebastian Dr=C3=B6ge
f72a55319d directsoundsink: Fix caps leaks 2012-07-04 19:54:55 +02:00
Andoni Morales Alastruey
1c6d1bd29a directsoundsink: fix acceptcaps check 2012-07-04 19:54:55 +02:00
Andoni Morales Alastruey
ed8ad7bffe directsoundsink: use helper function to check for spdif formats 2012-07-04 19:54:55 +02:00
Andoni Morales Alastruey
a9dff8adb9 directsoundsink: add support for DTS 2012-07-04 19:54:55 +02:00
Andoni Morales Alastruey
e815d08342 directsoundsink: force 48000 kHz force AC-3 over spdif 2012-07-04 19:54:51 +02:00
Andoni Morales Alastruey
7d64e16b30 directsoundsink: add support for ac-3 over spdif 2012-07-04 19:54:43 +02:00
Tim-Philipp Müller
b2b3de569a osxvideosink: default to force-aspect-ratio=true 2012-06-29 11:51:30 +01:00
Wim Taymans
56690cf021 v4l2: improve debug 2012-06-26 13:19:02 +02:00
Wim Taymans
77f33e591f Revert "v4l2: free kernel buffers before allocating new ones"
This reverts commit 1b09bc609a.

Seems to make libv4l2 complain, maybe because we call REQBUFS with 0 buffers
before we allocated buffers.
2012-06-26 13:02:13 +02:00
Wim Taymans
1b09bc609a v4l2: free kernel buffers before allocating new ones
See https://bugzilla.gnome.org/show_bug.cgi?id=670257
2012-06-26 12:07:47 +02:00
Wim Taymans
9fd4af2164 v4l2src: improve debug 2012-06-26 12:07:29 +02:00
Wim Taymans
f4e3ae65ab v4l2: setup strides and offsets for all planes 2012-06-26 11:14:59 +02:00
Josep Torra
d2c6cc3a39 osxaudiosink: respect the prefered channel layout
In OSX is allowed to configure the default audio output device,
prefered channel layout and speaker positions through the tool
"Audio MIDI Setup".
2012-06-19 12:55:37 +01:00
Josep Torra
59191412eb osxaudiosink: Add support for SPDIF output
A big refactoring to allow passthrough AC3/DTS over SPDIF.
Several random cleanups and minor fixes.
2012-06-14 08:46:34 +02:00
Hans de Goede
b9676944bb v4l2object: Don't probe UVC devices for being interlaced
UVC devices are never interlaced, and doing VIDIOC_TRY_FMT on them
causes expensive and slow USB IO, so don't probe them for interlaced.

This shaves 2 seconds of the startup time of cheese with a Logitech
Webcam Pro 9000.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677722
2012-06-11 11:23:34 +02:00
Wim Taymans
f65495d405 update for audio api change 2012-06-08 10:11:12 +02:00
Thiago Santos
44d010277c osxvideo: straightforward port to 0.11 2012-06-05 17:53:58 -03:00
Josep Torra
cfd9071f79 osxaudiosink: Handle endianness correctly 2012-06-04 11:54:46 +02:00
Josep Torra
85102c49d5 osxaudiosink: Add support for int audio 2012-06-01 16:38:22 +02:00
Michael Jones
fa95cec825 v4l2: add missing G_END_DECLS
G_BEGIN_DECLS didn't have matching G_END_DECLS

https://bugzilla.gnome.org/show_bug.cgi?id=677165
2012-05-31 13:13:45 +02:00
Josep Torra
bb8cdf4cc5 osxvideosink: Really fix the build on 10.5
The API that we use to run the Cocoa loop in another
thread does not exist in 10.5 or earlier.
2012-05-31 10:26:27 +02:00
Alessandro Decina
f20cdcd36b osxvideosink: fix race in starting the runloop thread
Block gst_osx_video_sink_run_cocoa_loop until the loop thread has started and
finished initializing NSApp. Fixes occasional warnings/crashes due to two
threads going inside NSApp before finishLaunching had completed.
2012-05-31 10:26:10 +02:00
Josep Torra
76b7998e4f osxvideosink: Fix last commit to actually work
MAC_OS_X_VERSION_10_6 is obviously not defined on 10.5.
2012-05-30 16:03:55 +02:00
Sebastian Dröge
88554404e6 osxvideosink: Put the right flags in the right variable 2012-05-30 13:51:35 +02:00
Sebastian Dröge
efab9e6aa3 osxvideosink: NSWindowDelegate is available in all OSX versions newer than 10.6 2012-05-30 12:43:37 +02:00
Josep Torra
c106a3653b osxvideosink: Fix build with older OSX versions 2012-05-30 12:40:57 +02:00
Sebastian Dröge
6bd61f861c configure: Add OBJC specific compiler flags
See bug #643939.
2012-05-30 11:28:33 +02:00
Andoni Morales Alastruey
5b3d3b0885 osxvideosink: make sure all selectors are performed on the same thread
When we are using a dedicated thread to run the main run loop we
must make sure that all selectors are performed on this same thread.
For instance if performSelectorOnMainThread is called from the real
main thread, it will not go through the message queue and will be
executed from the real main thread. By forcing the target thread,
we ensure that all functions will be called either from the real
main thread when the main run loop is running or from our thread
spinning the main loop.
2012-05-25 11:07:35 +02:00
Alessandro Decina
57e43aeb21 osxvideosink: start the loop before calling [gstview haveSuperview]
...as haveSuperview requires the mainloop to be running
2012-05-24 14:36:13 +02:00
Alessandro Decina
dc8de54cce osxvideosink: fix indentation 2012-05-24 14:36:09 +02:00
Alessandro Decina
fdf5fd9f16 osxvideosink: enable running the cocoa main runloop in a thread 2012-05-24 14:36:03 +02:00
Alessandro Decina
718837d914 osxvideosink: add code to optionally run the cocoa main runloop in a separate thread
Add a little hack to run the cocoa main runloop from a separate thread _when_
the main runloop is not being run (which means that the app doesn't use cocoa).
Runloops are thread specific, so the hack boils down to getting the runloop for
the main thread and setting it as the runloop for our dedicated thread.
2012-05-24 14:35:59 +02:00
Alessandro Decina
e3cba62b7e osxvideosink: reset app_started to FALSE when shutting down 2012-05-24 14:35:55 +02:00
Alessandro Decina
645b37e80a osxvideosink: rename cocoa runloop helper funcs 2012-05-24 14:35:51 +02:00
Alessandro Decina
7f576b923a osxvideosink: don't create application menus 2012-05-24 14:35:46 +02:00
Andoni Morales Alastruey
a3cf0ab5f5 osxvideosink: reset the embed property for backward compatilibity 2012-05-24 14:35:42 +02:00
Andoni Morales Alastruey
7cc93e9195 osxvideosink: fix navigation when force-aspect-ratio is activated 2012-05-24 14:35:37 +02:00
Andoni Morales Alastruey
fd19abf9ee osxvideosink: add force-aspect-ratio property 2012-05-24 14:35:32 +02:00
Andoni Morales Alastruey
9b8bfe9b9e osxvideosink: start internal window if no view is provided 2012-05-24 14:35:27 +02:00
Andoni Morales Alastruey
ba5d55dd69 osxvideosink: implement the navigation interface 2012-05-24 14:35:21 +02:00
Andoni Morales Alastruey
088bc6b056 osvideosink: create, destroy, resize and draw from the main thread 2012-05-24 14:35:16 +02:00
Peter Seiderer
65a28698db v4l2src: fix v4l2_std_id logging
input.std is of type v4l2_std_id which is defined as 64-bit unsigned integer.
Casting to uint means the higher bits, wich are used for the private video
standards of the TI video capture/display driver for example, are lost.
2012-05-09 15:12:28 +01:00
Руслан Ижбулатов
cb4f470c7e waveform: No more gstinterfaces
Fixes #675319
2012-05-03 09:33:29 +02:00
Руслан Ижбулатов
ccc0c9c313 directsound: No more gstinterfaces
Fixes #675319
2012-05-03 09:33:29 +02:00
Sebastian Dröge
982148c07c v4l2src: Update for basesrc API changes 2012-05-01 13:33:46 +02:00
Wim Taymans
a473750350 v4l2: improve timestamp code
Sample the pipeline clock and device clock closer to eachother to reduce jitter.
Don't subtract the frame duration from the timestamp when we can use the device
timestamps.
Assume a delay of 1 frame in read-write mode.
2012-04-25 09:41:46 +02:00
Wim Taymans
46045316ce v4l2: use driver timestamps
Use the drive timestamps for timestamping outgoing buffers.
2012-04-24 12:37:33 +02:00
Wim Taymans
eecb9a96a6 v4l2: Improve buffer management
Query the amount of available buffers when doing set_config(). This allows us to
configure the parent bufferpool with the number of buffers to preallocate.
Keep track of the provided allocator and use it when we need to allocate a
buffer in RW mode.
When we are can not allocate the requested max_buffers amount of buffers, make
sure we keep 2 buffers around in the pool and copy them into an output buffer.
This makes sure that we always have a buffer to capture into. We also need to
detect those copied buffers and unref them when they return to the pool.
2012-04-23 18:10:33 +02:00
Wim Taymans
713ddbf541 v4l2: free the queued buffers
Only free the queued buffers that we keep track of in our buffer array. for rw
io-mode, we do allocate buffers but we don't keep track of them in the buffer
array.
2012-04-23 18:10:33 +02:00
Wim Taymans
5d7d4e0d9b v4l2: mark memory as no-share
We don't support sharing our mmapped memory so mark it as NO_SHARE.
2012-04-23 18:10:33 +02:00
Wim Taymans
9fe11d0d11 v4l2: remove old unused file 2012-04-23 18:10:33 +02:00
Wim Taymans
37e7a41771 v4l2: remove unused function 2012-04-23 18:10:33 +02:00
Mart Raudsepp
8719375be7 docs: Add Since tag for new GstV4l2Src::prepare-format signal 2012-04-23 11:24:19 +02:00
Mark Nauwelaerts
a5ff454e6a oss4: port to 0.11 2012-04-20 18:18:54 +02:00
Mark Nauwelaerts
c4c3736e1a oss: port to 0.11 2012-04-20 18:18:54 +02:00
Wim Taymans
f08bab4e86 v4l2: update for video api change 2012-04-19 14:16:01 +02:00
Wim Taymans
85d4dde9d1 v4l2: fix compilation on older v4l2
Fix compilation on systems where the H264 format is not defined.
2012-04-19 12:38:58 +02:00
Sebastian Dröge
04b70571e5 video: Update for libgstvideo API changes 2012-04-19 12:20:59 +02:00
Youness Alaoui
09dabd4be6 v4l2src: Allow mpeg-ts cameras to negociate format
This removes an ugly hack until the reason for the hack can be documented
2012-04-19 10:31:18 +02:00
Sebastian Dröge
e7a76badc5 v4l2src: Fix merge 2012-04-19 09:50:25 +02:00
Sebastian Dröge
deb7cdcdda v4l2src: Rename pre-set-format signal to prepare-format 2012-04-19 09:50:01 +02:00
Youness Alaoui
a63451ecd7 v4l2src: Add H264 encoded stream support to the caps
This is not enough to properly support H264 cameras, but it will
allow an H264 stream to be generated by v4l2src using the default
settings of the camera. If used with the pre-set-format signal, the
H264 encoder can be fully configured.

Conflicts:

	sys/v4l2/gstv4l2object.c
2012-04-19 09:49:33 +02:00
Youness Alaoui
06d64c7792 v4l2src: Adding a pre-set-format signal
In order to support UVC H264 encoding cameras, an H264 Probe&Commit
must happen before the normal v4l2 set-format. This new signal is
meant to allow an external application or bin to do it.
It also serves to expose the file descriptor used by v4l2src in case
some custom ioctls need to be called.

Conflicts:

	sys/v4l2/Makefile.am
	sys/v4l2/gstv4l2src.c
	sys/v4l2/v4l2src_calls.c
2012-04-19 09:45:49 +02:00
Víctor Manuel Jáquez Leal
8c5d8b52ea v4l2: ensure autogenerated files are created
The tuner marshal and enumtypes are autogenerated, and they need
to be created before the compilation of gstv4l2tuner.c

This patch adds the automake instruction for ensuring the
autogeneration of those files previous the compilation.
2012-04-13 17:13:22 +02:00
Sebastian Dröge
d99eb6d2cb Update everything for the removal of the interface library and mixer/tuner interfaces 2012-04-13 13:15:11 +02:00
Руслан Ижбулатов
f0685dd026 Remove unused variable
Fixes #673859
2012-04-10 22:41:04 +01:00
Tim-Philipp Müller
e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Sebastian Dröge
aa2cd462da gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 17:36:38 +02:00
Sebastian Dröge
5cdd49bf25 gst: Update versioning 2012-04-04 14:37:47 +02:00
Wim Taymans
3d61d12e03 update for buffer api change 2012-03-30 18:15:34 +02:00
Wim Taymans
e310ee8218 caps: improve caps handling
Avoid caps copy and leaks
2012-03-27 16:42:41 +02:00
Wim Taymans
098d8ceae7 v4l2: update for get_param
Remove const from the GstCaps.
Plug some GstStructure leaks
2012-03-27 12:44:46 +02:00
Wim Taymans
01838ff975 v4l2src: don't error in shutdown
Don't log with the ERROR category when we are stopping because we are shutting
down.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=672824
2012-03-26 16:00:42 +02:00
Wim Taymans
cfe58e7156 v4l2: fix latency 2012-03-26 15:51:28 +02:00
Wim Taymans
fa436c0799 v4l2: called base class start
Chain up to the base class start method so that metadata is properly tagged.
Remove an unused variable.

fixes: https://bugzilla.gnome.org/show_bug.cgi?id=672813
2012-03-26 15:33:59 +02:00
Wim Taymans
c44cd8f55b Merge branch 'master' into 0.11
unport gdkpixbuf
not merged: https://bugzilla.gnome.org/show_bug.cgi?id=654850

Conflicts:
	docs/plugins/Makefile.am
	docs/plugins/gst-plugins-good-plugins-docs.sgml
	docs/plugins/gst-plugins-good-plugins-sections.txt
	docs/plugins/gst-plugins-good-plugins.hierarchy
	docs/plugins/inspect/plugin-avi.xml
	docs/plugins/inspect/plugin-png.xml
	ext/flac/gstflacdec.c
	ext/flac/gstflacdec.h
	ext/libpng/gstpngdec.c
	ext/libpng/gstpngenc.c
	ext/speex/gstspeexdec.c
	gst/audioparsers/gstflacparse.c
	gst/flv/gstflvmux.c
	gst/rtp/gstrtpdvdepay.c
	gst/rtp/gstrtph264depay.c
2012-03-22 11:53:24 +01:00
Wim Taymans
ced47580b7 update for bufferpool changes 2012-03-15 22:11:17 +01:00
Wim Taymans
f3a770a20c update for allocation query changes 2012-03-15 20:37:56 +01:00
Wim Taymans
6ed3bc109b update for bufferpool api change 2012-03-15 14:06:40 +01:00
Wim Taymans
ecaea36c3d update for memory api changes 2012-03-15 13:36:17 +01:00
Wim Taymans
751fcf035b take padding into account 2012-03-14 19:56:56 +01:00
Wim Taymans
80dca40c35 fix for _do_simplify changes 2012-03-12 10:43:57 +01:00
Wim Taymans
a32d944a38 fix for caps api changes 2012-03-11 19:06:37 +01:00
Sebastian Dröge
9d5e5ea553 ximagesrc: Fix 'comparison of unsigned expression >= 0 is always true'
This variable can never be below zero anyway.
2012-03-06 14:23:05 +01:00
Mark Nauwelaerts
26dd999b68 Merge branch 'master' into 0.11
Conflicts:
	ext/wavpack/gstwavpackparse.c
	sys/v4l2/gstv4l2bufferpool.c
	sys/v4l2/gstv4l2bufferpool.h
	sys/v4l2/gstv4l2videooverlay.c
2012-03-05 13:29:59 +01:00
Wim Taymans
2adc948d18 x-raw-bayer -> x-bayer 2012-03-05 12:43:17 +01:00
Oleksij Rempel (Alexey Fisher)
a83d2f7047 v4l2sink: don't use deprecated XKeycodeToKeysym
https://bugzilla.gnome.org/show_bug.cgi?id=671299

Signed-off-by: Oleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
2012-03-05 11:34:36 +00:00
Wim Taymans
1dada15ccf ximage: use new style caps 2012-03-05 12:03:01 +01:00
Tim-Philipp Müller
6f707fcbca v4l2: clear DISCONT flag when recycling buffers into the buffer pool
The base class may have set the DISCONT flag on the first buffer pushed
out. We need to clear that when recycling buffers back into the buffer
pool, otherwise we constantly push out buffers with the discont flag
set, which might upset downstream elements, esp. for compressed
formats like mpeg-ts.
2012-03-03 13:07:45 +00:00
Oleksij Rempel (Alexey Fisher)
4cd9255f0a v4l2src: fix v4l2_munmap() for compressed formats
Make sure we always call munmap() with the same size we called mmap()
with before.

Current v4l2src uses the same structure for VIDIOC_QUERYBUF, VIDIOC_QBUF
and v4l2_munmap calls. The problem is that the video buffer size (length)
may vary for compressed or emulated bufs. VIDIOC_QBUF will change it if
we pass the pointer of a v4l2_buffer. This is why we should avoid using
same variable for mmap and video buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=671126
2012-03-03 13:07:40 +00:00
Sebastian Dröge
3299f39179 mixer/colorbalance: Update for API changes 2012-03-02 10:13:08 +01:00
Mark Nauwelaerts
f189f62b13 Merge branch 'master' into 0.11
Conflicts:
	ext/wavpack/gstwavpackenc.c
	tests/check/elements/audioiirfilter.c
	tests/examples/v4l2/probe.c
2012-03-01 11:29:50 +01:00
Wim Taymans
9c789aa434 update for metadata API changes 2012-02-29 17:26:01 +01:00
Wim Taymans
dda3219e4c update for metadata tags 2012-02-28 11:38:59 +01:00
Edward Hervey
9beda57c3a Suppress deprecation warnings in selected files, for g_value_array_* mostly 2012-02-27 14:47:25 +01:00
Wim Taymans
c17aa1565a v4l2: use public api
instead of poking into the private structures of the base class
2012-02-27 09:21:27 +01:00
Wim Taymans
0ab5677107 update for metadata change 2012-02-24 10:26:26 +01:00
Wim Taymans
ca9532ccc5 update for new memory api 2012-02-22 02:10:33 +01:00
Wim Taymans
6623ab258b Merge branch 'master' into 0.11 2012-02-16 14:23:50 +01:00
Gary Ching-Pang Lin
c1c858f273 v4l2src: failure to query some optional controls is not a fatal error
Don't post a (fatal) error message on the bus just because we
failed to query some control. Fixes issue with built-in
Suyin Corp webcam for HP notebook (usbid 064e:e28a) on
OpenSuse 12.1, where querying red/blue balance fails.

https://bugzilla.gnome.org/show_bug.cgi?id=670197
2012-02-16 13:10:47 +00:00
Tuukka Pasanen
ef37bb48bc v4l2src: fix for webcamstudio vloopback
Because vlooback emits 25 - ENOTTY and no EINVAL v4l2src thought it
can't handle this and does not work.

https://bugzilla.gnome.org/show_bug.cgi?id=669455
2012-02-16 12:59:10 +00:00
Wim Taymans
9365f12d6e GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:43:30 +01:00
Raimo Järvi
697dcc60b4 directsoundsink: Fix compiling
https://bugzilla.gnome.org/show_bug.cgi?id=669607
2012-02-07 23:20:19 +00:00
Raimo Järvi
b7b3161c26 waveformsink: Port to 0.11
https://bugzilla.gnome.org/show_bug.cgi?id=669612
2012-02-07 22:56:47 +00:00
Andoni Morales Alastruey
83090f6530 direcsoundsink: Port element to 0.11 2012-01-27 18:26:18 +01:00
Sebastian Dröge
0b517ce9fb Merge branch '0.11' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good into 0.11 2012-01-25 12:49:34 +01:00
Sebastian Dröge
10554b271f Merge branch 'master' into 0.11
Conflicts:
	ext/flac/gstflacdec.c
	ext/jpeg/gstjpegenc.c
	ext/pulse/pulsesink.c
	sys/v4l2/gstv4l2src.c
2012-01-25 12:49:11 +01:00
Wim Taymans
b4630dd3e0 more memory API porting 2012-01-25 12:30:29 +01:00
Tim-Philipp Müller
7cb9b7ab9d Use new GLib API unconditionally 2012-01-22 23:15:19 +00:00
Wim Taymans
1584806634 port to new gthread API 2012-01-19 11:33:53 +01:00
Vincent Penquerc'h
f799fb2c90 oss4: fix caps leaks 2012-01-13 17:43:49 +00:00
Vincent Penquerc'h
b0608128b1 v4l2src: fix caps leak 2012-01-13 17:25:59 +00:00
Stig Sandnes
ffe010ee4d osxvideo: Fix leak of NSOpenGLPixelFormat object
https://bugzilla.gnome.org/show_bug.cgi?id=667818
2012-01-13 10:14:34 +00:00
Havard Graff
150403ab13 v4l2src: Don't assert when the interface is not implemented.
Simply return FALSE instead.

https://bugzilla.gnome.org/show_bug.cgi?id=667817
2012-01-13 10:07:20 +00:00
Raimo Järvi
e886ef8f5b waveformsink: Fix mingw warnings
https://bugzilla.gnome.org/show_bug.cgi?id=667719
2012-01-13 09:43:47 +00:00
Sebastian Dröge
93e3ed5a86 Merge branch 'master' into 0.11
Conflicts:
	ext/cairo/gsttextoverlay.c
	ext/pulse/pulseaudiosink.c
	gst/audioparsers/gstaacparse.c
	gst/avi/gstavimux.c
	gst/flv/gstflvmux.c
	gst/interleave/interleave.c
	gst/isomp4/gstqtmux.c
	gst/matroska/matroska-demux.c
	gst/matroska/matroska-mux.c
	gst/matroska/matroska-mux.h
	gst/matroska/matroska-read-common.c
	gst/multifile/gstmultifilesink.c
	gst/multipart/multipartmux.c
	gst/shapewipe/gstshapewipe.c
	gst/smpte/gstsmpte.c
	gst/udp/gstmultiudpsink.c
	gst/videobox/gstvideobox.c
	gst/videocrop/gstaspectratiocrop.c
	gst/videomixer/videomixer.c
	gst/videomixer/videomixer2.c
	gst/wavparse/gstwavparse.c
	po/ja.po
	po/lv.po
	po/sr.po
	tests/check/Makefile.am
	tests/check/elements/qtmux.c
	tests/check/elements/rgvolume.c
2012-01-10 14:32:32 +01:00
Sebastian Dröge
177dd68d06 oss: Port to the new multichannel caps and the raw audio caps interleaved field 2012-01-05 10:30:30 +01:00
Tim-Philipp Müller
2be912cb45 waveformsink: fix compiler warnings with MingW
https://bugzilla.gnome.org/show_bug.cgi?id=666485
2011-12-27 22:59:03 +00:00
Yaakov Selkowitz
e72b55b6ac waveform: add autotools bits for waveform plugin
https://bugzilla.gnome.org/show_bug.cgi?id=666485
2011-12-26 22:22:59 +00:00
Wim Taymans
4b8975f867 update for removed property probe 2011-12-21 11:59:46 +01:00
Wim Taymans
4f42f58565 v4l2: update for new interlaced caps 2011-12-19 19:03:52 +01:00
Tim-Philipp Müller
330d984288 Use g_thread_try_new() instead of g_thread_crate() with newer glib versions 2011-12-12 09:46:27 +00:00
Tim-Philipp Müller
66f6e12888 Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.
2011-12-12 09:46:27 +00:00
Tim-Philipp Müller
668e15598b Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	sys/v4l2/gstv4l2object.c
2011-12-08 01:28:26 +00:00
Vincent Penquerc'h
687d6138d1 v4l2src: do not ignore the highest frame interval
https://bugzilla.gnome.org/show_bug.cgi?id=665387
2011-12-07 13:41:12 +00:00
Vincent Penquerc'h
2b0a001d0d v4l2src: do not ignore the largest resolution
The 'max' value isn't an STL style "one after the end" bound,
but the largest allowed value.

https://bugzilla.gnome.org/show_bug.cgi?id=665387
2011-12-07 13:41:12 +00:00
Tim-Philipp Müller
87ba312e19 v4l2: replace deprecated GST_CLASS_LOCK 2011-12-05 12:15:21 +00:00
Vincent Penquerc'h
1e974b1581 v4l2src: add a comment about a "hidden" assumption on rank values
https://bugzilla.gnome.org/show_bug.cgi?id=665387
2011-12-02 14:44:47 +00:00
Wim Taymans
710491109d fix for moved interfaces 2011-11-29 19:10:58 +01:00
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Tim-Philipp Müller
736a484129 More printf format warning fixes 2011-11-22 01:40:39 +00:00
Matej Knopp
1e5dd9e315 Fix printf format compiler warnings on OS X / 64bit
https://bugzilla.gnome.org/show_bug.cgi?id=662615
2011-11-22 01:28:22 +00:00
Wim Taymans
07cc855b24 Merge branch 'master' into 0.11
Conflicts:
	ext/speex/gstspeexenc.c
	gst/rtpmanager/rtpsession.c
2011-11-17 17:17:11 +01:00
Wim Taymans
797523efbd _peer_get_caps() -> _peer_query_caps() 2011-11-15 18:04:44 +01:00
Wim Taymans
b2d508ac40 update for _get_caps() -> _query_caps() 2011-11-15 18:04:44 +01:00
Sjoerd Simons
e7ae593993 v4l2: Set pixel-aspect-ratio to 1/1
We don't currently support setting the pixel-aspect-ratio from V4L2. So
simply set it to be 1/1 in the caps to prevent negotiation failures when
fixating to weird values (e.g. when the downstream caps has
pixel-aspect-ratio = [ MIN, MAX ] )

https://bugzilla.gnome.org/show_bug.cgi?id=663580
2011-11-14 11:43:41 +01:00
Tim-Philipp Müller
c27bbe4be2 Update for GstURIHandler get_protocols() changes 2011-11-13 23:44:44 +00:00
Tim-Philipp Müller
a150d1e734 soup, pushfile, rtsp, udp, v4l2: update for GstURIHandler API changes 2011-11-13 18:50:51 +00:00
Wim Taymans
88e398b0ea update for removed fixate function 2011-11-10 11:03:18 +01:00
Stefan Sauer
fb162c8eb4 controller: port to new controller location and api 2011-11-04 20:15:48 +01:00
Wim Taymans
b1ef7e8a86 update for meta api change 2011-11-02 09:06:37 +01:00
Wim Taymans
9a8a8e72c8 structure: fix for api update 2011-11-02 09:06:37 +01:00
Tim-Philipp Müller
d18a578ba4 rtpmanager, v4l2: fix compiler warnings after gst_caps_new_simple() change 2011-10-28 09:06:41 +01:00
Wim Taymans
fc4684f4c6 fix compilation 2011-10-27 16:03:17 +02:00
Stefan Sauer
2468492f02 interfaces: clean up the use of iface and class/klass 2011-10-21 14:58:41 +02:00
Wim Taymans
586ef0babd Merge branch 'master' into 0.11
Conflicts:
	ext/speex/gstspeexdec.c
	ext/speex/gstspeexenc.c
	gst/isomp4/atoms.c
	gst/isomp4/gstqtmux.c
2011-10-06 12:23:39 +02:00
Stas Sergeev
73fac4e5bc v4l2, ximagesrc: fix some printf format compiler warnings
https://bugzilla.gnome.org/show_bug.cgi?id=660150
2011-09-30 18:05:32 +01:00
Wim Taymans
87fbd1e784 Merge branch 'master' into 0.11
Conflicts:
	common
	ext/pulse/pulsesink.c
	ext/soup/gstsouphttpclientsink.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtpmanager/gstrtpjitterbuffer.c
	gst/rtpmanager/rtpjitterbuffer.c
	gst/rtsp/gstrtspsrc.c
	sys/ximage/gstximagesrc.c
2011-09-28 12:44:59 +02:00
Vincent Penquerc'h
82927d6bdd ximagesrc: add xid and xname properties to allow capturing a particular window
A particular window may be selected using the new xid (X-Window
XID, eg a pointer) and xname (window title) properties. If both
are specified, the XID is used in preference, falling back to
xname if not found.

Default (if none of xid and xname are specified, or if no such
window is found) is to capture the root window.

https://bugzilla.gnome.org/show_bug.cgi?id=546932
2011-09-20 13:09:35 +01:00
Guillaume Desmottes
06c65418d7 v4l2: use GST_RESOURCE_ERROR_BUSY if v4l2_ioctl fails with EBUSY
https://bugzilla.gnome.org/show_bug.cgi?id=658543
2011-09-08 15:04:42 +02:00
Wim Taymans
5b55cf057b Merge branch 'master' into 0.11
Conflicts:
	sys/v4l2/v4l2src_calls.c
2011-08-29 13:43:59 +02:00
Wim Taymans
75e153bb13 allocation: fix for vmethod changes 2011-08-26 14:20:49 +02:00
Vincent Penquerc'h
3968dc7688 v4l2src: make this work more than once in a row
We used to skip frame rate setup if the camera was already setup
with the requested frame rate. This breaks some cameras though,
causing them to not output data (several models of Thinkpad cameras
have this problem at least).
So, don't skip.

https://bugzilla.gnome.org/show_bug.cgi?id=638300
2011-08-26 10:33:10 +02:00
Wim Taymans
18065ac823 port to new video flags 2011-08-25 16:41:23 +02:00
Wim Taymans
77ad0a1363 port more elements to new audio caps and API 2011-08-19 14:01:45 +02:00
Wim Taymans
44c1589b48 v4l2: improve fixate function
Use new core function to fixate a field.
Chain up to parent fixate function.
2011-08-17 17:57:11 +02:00
Wim Taymans
4bb2b140e9 Merge branch 'master' into 0.11
Conflicts:
	sys/v4l2/v4l2src_calls.c
2011-08-16 18:35:53 +02:00
Vincent Penquerc'h
26993420c0 ximagesrc: clear flags on buffer reuse
This will ensure a logically new buffer does not keep flags from
a previous use of that buffer (eg, DISCONT would be set on the first
buffer, and mistakenly kept when reused).

https://bugzilla.gnome.org/show_bug.cgi?id=653709
2011-08-09 10:19:46 +02:00
Vincent Penquerc'h
639abf01f9 v4l2: take care not to change the current format where appropriate
Some drivers are buggy are will change the current format when
processing VIDIOC_TRY_FMT. Save and restore the current format
to ensure the format is kept unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=649067
2011-08-09 09:53:33 +02:00
Tim-Philipp Müller
d5db5ca9be v4l2: update for GstXOverlay => GstVideoOverlay rename 2011-08-08 15:25:31 +01:00
Sjoerd Simons
8edb15d12f v4l2src: Use fraction compare util function.
Use the fraction compare utility to compare function, not the
handcrafted one. The handcrafted one is buggy as it doesn't take into
account rounding error. For example comparing a framerate of 20/1 on a
camera configured as 30/1 fps would yield true: 1 == (1 * 20)/30 and not
re-configure the camera. Fixes #656104
2011-08-07 16:41:53 +02:00
Wim Taymans
1b1fb68c23 v4l2src: call set_caps method of baseclass
Call the baseclass set_caps function to make it send the caps event and
properly trigger the negotiation functions.
2011-08-04 16:35:46 +02:00
Edward Hervey
dc14c1ffc9 v4l2sink: Size variable should be a guint and not a gsize 2011-08-04 13:52:18 +02:00
Wim Taymans
add1cbdbd8 v4l2: activate the pool in fallback
When nobody is using our pool, activate it ourselves.
Avoid leaking the buffer array.
Set default pool configuration with caps.
Don't keep current_caps, core does that for us now.
2011-08-04 12:56:47 +01:00
Wim Taymans
4121021bb2 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtp/gstrtph264pay.c
	gst/rtpmanager/gstrtpssrcdemux.c
2011-08-03 18:25:30 +02:00
Tim-Philipp Müller
a1712ad87c docs: fix two more Since: tags 2011-08-02 23:42:58 +01:00
Wim Taymans
752a6778b2 v4l: change for new API 2011-07-29 17:21:36 +02:00
Wim Taymans
63fc64dd98 v4l2: remove unused variables
Use the more specialized type for the bufferpool.
Use the size from the driver as the size of the image to read.
Don't configure the pool when created. This will be done in the setup_allocation
method later or by upstream for sinks.
Remove unused properties and variables. Bufferpool sizes are now configured in
the bufferpool by the elements in the pipeline. We might want to influence the
pool size later somehow.
2011-07-27 16:46:46 +02:00
Wim Taymans
b638bb4735 v4l2bufferpool: remove unused variable 2011-07-27 13:46:09 +02:00
Wim Taymans
f7c500fe9c v4l2src: add metadata 2011-07-27 13:43:08 +02:00
Wim Taymans
fcfdececce bufferpool: check for metadata
Only add video metadata when it was configured in the pool. Fail if there was no
video metadata configured and the strides are not the default ones.
2011-07-27 13:41:28 +02:00
Wim Taymans
443e9f7c1d v4l2: add colorspace to debug 2011-07-27 12:41:33 +01:00
Wim Taymans
8c4241427a v4l2: rename a variable
Rename the size variable to sizeimage and fill it with the size that has been
given to use by the v4l2 driver instead of making something up..
2011-07-26 16:15:05 +02:00
Wim Taymans
e43ab9f2cd v4l2: use new setup_allocation vmethod 2011-07-26 13:18:55 +02:00
Wim Taymans
b2e1532021 v4l2: implement more bits of RW I/O mode
Implement the relaese of RW buffers in the pool.
Warn for unsupported write() mode for sinks.
2011-07-26 10:56:07 +01:00
Wim Taymans
be32a6393e v4l2: improve IO mode error handling
Error out when an unsupported IO mode was selected
2011-07-26 10:54:23 +01:00
Wim Taymans
9a8f1c4339 v4l2: remove unused method 2011-07-25 15:51:22 +02:00
Wim Taymans
e6a8718f0c v4l2: fix flushing start and stop
Move the flushing calls to the right place in the bufferpool.
Fix the min and max buffer sizes.
2011-07-25 15:39:18 +02:00
Wim Taymans
0a88ac4c92 v4l2: dequeue buffers when all are queued
Prefer to always use the default bufferpool queue for the _acquire function
because it properly supports unblocking when setting inactive etc. As a result,
we need to dequeue buffers and put them back in the bufferpool queue when we
have queued all buffers in the sink.
Rename some variables to more meaningfull names to avoid a problem with
freeing the wrong amount of buffers.
2011-07-25 14:47:05 +01:00
Wim Taymans
b98bc75f47 v4l2: only to STREAMOFF when streaming
Only call STREAMOFF when we previously called STREAMON
2011-07-25 10:24:33 +01:00
Wim Taymans
44fa0b9cab v4l2: handle unsupported formats 2011-07-19 18:20:43 +01:00
Wim Taymans
87d9a57aba v4l2: Fix sink bufferpool handling
Remove old method, use neww _process method for the sink.
Inform the parent bufferpool class about the settings too. This is needed to let
it know about the max-buffers.
Allocate the negotiated max-buffers and initially mmap min-buffers. The idea is
that the bufferpool will allocate more when needed.
Improve debugging.
Only poll in capture mode, it does not seem to work in playback mode on this
beagleboard.
2011-07-19 16:59:55 +01:00
Wim Taymans
55eb26f1e7 v4l2: More work on bufferpools
Add different transport methods to the bufferpool (MMAP and READ/WRITE)
Do more parsing of the bufferpool config.
Start and stop streaming based on the bufferpool state.
Make separate methods for getting a buffer from the pool and filling it with
data. This allows us to fill buffers from other pools too. Either use copy or
read to fill up the target buffers.
Add property to force a transfer mode in v4l2src.
Increase default number of buffers to 4.
Negotiate bufferpool and its properties in v4l2src.
2011-07-18 18:54:49 +02:00
Wim Taymans
39716c02a7 v4l2: add IO method enum 2011-07-18 10:52:23 +02:00
Wim Taymans
23656bbb72 bufferpool: improve _new function 2011-07-18 10:51:21 +02:00
Wim Taymans
4440801ace v4l2: implement setup_allocation
Implement the setup_allocation vmethod, we'll hopefully do something clever in
there later.
2011-07-15 16:55:50 +02:00
Wim Taymans
3eaecf3aed v4l2: improve bufferpool config setting
Pass the caps and the default video size to the bufferpool config.
Don't activate the bufferpool, this will be done by the object that decides to
use the bufferpool.
Improve debugging and error reporting.
2011-07-15 16:26:06 +01:00
Wim Taymans
37ef3f8997 v4l2: handle dequeueing correcly
First clean up the buffers in the queue, then the remaining ones in the
device.
2011-07-15 13:52:38 +01:00
Wim Taymans
c807bfb693 v4l2: unref copied buffer
After we copy the incomming buffer to one of our bufferpool buffers, unref the
target buffer after rendering so that it is put back in the pool.
2011-07-15 13:29:42 +01:00
Wim Taymans
b1378f159a v4l2: dequeue buffers for the sink
When we have all buffers queued for playback and we need a new empty buffer,
dequeue one and return it.
Set the right size for sink buffers.
Improve counting of queued buffers.
2011-07-15 13:07:11 +01:00
Wim Taymans
4dc85b87d9 v4l2: use the parent queue for the sink
We want to maintain a queue of free buffers for the sink, use the parent methods
to do that.
2011-07-15 12:35:14 +01:00
Wim Taymans
47816e1155 v4l2: fix error messages 2011-07-15 12:00:54 +02:00
Wim Taymans
549a4ddc8f v4l2: add ALLOCATION query to the sink 2011-07-15 11:30:25 +02:00
Wim Taymans
21f532ae10 v4l2: convert to GstBufferPool
Extend from GstBufferPool.
Handle the lifetime of the pool buffers correctly with the start/stop vmethods.
Map acquire and release directly to QBUF and DQBUF. We still expose an explicit
qbuf for the v4l2sink for now.
2011-07-15 11:27:18 +02:00
Wim Taymans
0f16daed15 v4l2: remove experimental markers 2011-07-15 11:18:03 +02:00
Wim Taymans
ef18a3c09b v4l2: merge code 2011-07-14 16:21:36 +02:00
Wim Taymans
33d93069c1 v4l2: Move output details to device object
Move the details of how a buffer is rendered to the device object.
2011-07-14 16:12:15 +02:00
Wim Taymans
7c5f5b1b7f v4l2: move capture code to device object
Move the details of how to capture to the device object. Remove the
v4l2src_calls.[ch] files because they are empty now.
Provide two simple methods to get and return a buffer to the device.
Also do a slow copy when the buffer is not from our pool.
2011-07-13 18:32:00 +02:00
Wim Taymans
ebd03a3fad v4l2: add some more debug 2011-07-13 16:58:08 +02:00
Wim Taymans
d7a27613c1 v4l2: stop streaming in READY and NULL 2011-07-13 16:56:21 +01:00
Wim Taymans
387e76114d v4l2: start streaming for the output as well 2011-07-13 16:40:39 +02:00
Wim Taymans
d9e61954a1 v4l2: Let the device object manage the pool
Rename start and stop methods to open and close because that is what they do.
After setting the format on the device object, setup the bufferpools. Move this
code from the v4l2src_calls.c file, it is shared between source and sink.
Make new device start and stop method that merges various bits of common code
spread over several files.
2011-07-13 16:33:58 +02:00
Wim Taymans
398001f20d v4l2: don't store stride in the videoinfo
We want to keep the default strides in the videoinfo. Keep the stride of the
video frames separate so that we can use both to copy a video frame and do
correct stride conversion.
2011-07-13 13:52:30 +01:00
Wim Taymans
3aed125163 v4l2: Use video frame copy for raw video
Use the video frame copy API for raw video frames so that we copy with the right
strides.
2011-07-13 13:38:15 +02:00
Wim Taymans
e77d183a1e v4l2: add video metadata to raw video buffers 2011-07-13 13:37:58 +02:00
Wim Taymans
be83e4f704 v4l2: small cleanups 2011-07-13 13:15:16 +02:00
Wim Taymans
01def08e7a v4l2: improve caps parsing
Use GstVideoInfo to store the parsed caps.
Remove outsize from the caps parsing code, it's wrong because it does not use
the stride given by the driver.
2011-07-13 13:04:40 +02:00
Wim Taymans
c83730fc11 v4l2: use errno 2011-07-13 11:40:11 +01:00
Wim Taymans
6d97bfc41f v4l2: handle EINVAL without posting a warning
EINVAL means that a call is not supported, we only want to post a WARNING when
something is really wrong.
2011-07-13 11:36:54 +02:00
Wim Taymans
50ce1807f0 v4l2: only set framerate for capture for now 2011-07-13 11:29:26 +02:00
Wim Taymans
9f4cf3be58 v4l2: Move configuration of framerate to _set_format
Move the configuration of the framerate to where we set the other format
parameters.
Remove hack to check if the device is active.
Store streamparm in the device info.
Use some macros to access the current device configuration.
Remove some duplicate fields in src and sink and use the device configuration
instead.
2011-07-13 11:19:28 +02:00
Wim Taymans
100d46b5b9 v4l2: fix return value... 2011-07-12 19:13:45 +02:00
Wim Taymans
e8ae00f5fc v4l2: simplify setting the capture format
Pass the caps to the set_format function and make _set_format parse the caps.
Also keep the parsed values in the v4l2object so that we can refer to them when
we want.
2011-07-12 19:03:32 +01:00
Wim Taymans
b7ad28ba53 v4l2: remove more unused parameters 2011-07-12 18:41:47 +01:00
Wim Taymans
baa03a951b v4l: handle object out of the normal flow 2011-07-12 18:29:35 +01:00
Wim Taymans
0dcf0aebb0 v4l2: Let the bufferpool own the V4l2Object
Keep track of the currently configured format and setting in the
v4l2object.
Pass the v4l2object to the bufferpool constructor so that the bufferpool can
know everything about the currently configured settings. This also allows us
to remove some awkward code.
2011-07-12 18:13:42 +02:00
Wim Taymans
f55656dcfc v4l: remove caps argument, it's not needed
Remove the caps parameter, we don't need it anymore because we don't set
caps on buffers anymore.
2011-07-12 17:06:41 +02:00
Wim Taymans
59b86d2558 v4l: pass the bytesperline around
When setting a format, return the bytesperline to the caller so that it can be
used to allocate buffers.
2011-07-12 16:46:21 +01:00
Wim Taymans
1ef806181c pool: make buffer writable
We need writable buffers when we need to do a slow memcpy.
2011-07-12 16:43:04 +01:00
Wim Taymans
e9d80b9f14 v4l2sink: handle pools
Create a new pool in setcaps and stop/destroy the old one.
Remove buffer_alloc functions.
Check that we have v4l2 metadata in show_frame and fall back to memcpy into a
buffer from our pool if we don't receive one of our own buffers.
2011-07-11 13:51:52 +02:00
Wim Taymans
851f550003 v4l2: various cleanups
Various cleanups, avoids useless casts, move error handling outside of the main
code flow.
Negotiate to a resonable resolution instead of the max resolution.
2011-07-11 12:15:12 +02:00
Wim Taymans
9e276e4f81 ximage: port to 0.11 2011-07-10 14:56:00 +02:00
Wim Taymans
caf1760694 Merge branch 'master' into 0.11 2011-07-10 11:42:37 +02:00
Philip Jägenstedt
fbe726c3da directsoundsink: 16-bit audio is signed, 8-bit is unsigned.
Pretending to handle 8-bit signed causes distorted audio when
actually given such audio, which you will get if passing 8-bit
unsigned through audioconvert ! audioresample, as audioresample
only handles 8-bit signed.  Fixes #605834.

Signed-off-by: David Schleef <ds@schleef.org>
2011-07-09 16:45:51 -07:00
Wim Taymans
3b4afcb8df v4l2: fix gray format, use filter in getcaps 2011-07-08 16:37:11 +02:00
Wim Taymans
7a296af37f v4l2: port and enable v4l2sink 2011-07-08 16:10:47 +02:00
Wim Taymans
b8640c8cd9 v4l2src: port to new video formats 2011-07-08 14:34:40 +02:00
Wim Taymans
e20d6f0bb5 v4l2: port to 0.11 2011-07-08 12:49:12 +02:00
Wim Taymans
cc65bff7c1 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	docs/plugins/inspect/plugin-esdsink.xml
	docs/plugins/inspect/plugin-gconfelements.xml
2011-06-21 18:24:41 +02:00
Tim-Philipp Müller
53ee37b3d2 sunaudio: fix typo in comment 2011-06-18 13:36:06 +01:00
Wim Taymans
0b1bdcf7cb Merge branch 'master' into 0.11
Conflicts:
	sys/ximage/ximageutil.c
2011-06-02 18:51:29 +02:00
Sebastian Dröge
1f707ac3e0 xvimagesink: Fallback to non-XShm mode if allocating the XShm image failed
Fixes bug #630456.
2011-05-26 12:48:36 +02:00
Wim Taymans
d89790d545 Merge branch 'master' into 0.11
Conflicts:
	gst/avi/gstavidemux.c
	gst/rtp/gstrtpac3depay.c
	gst/rtp/gstrtpg726depay.c
	gst/rtp/gstrtpmpvdepay.c
	gst/videofilter/gstgamma.c
2011-05-24 17:34:19 +02:00
Rob Clark
9c9585116c v4l2: add norm property
Based on a patch by Guennadi Liakhovetski.

v2: updates because I forgot to add GstTuner interface to v4l2sink
v3: update to add all possible values to norm enum
2011-05-24 10:47:26 +02:00
Wim Taymans
e15651816e Merge branch 'master' into 0.11 2011-05-17 16:13:59 +02:00
Edward Hervey
1a310d558c v4l2objects: Only allow mpeg-ts on source objects
Ugly fix for #648312
2011-05-17 09:25:23 +02:00
Wim Taymans
7555d0949f Merge branch 'master' into 0.11
Conflicts:
	android/apetag.mk
	android/avi.mk
	android/flv.mk
	android/icydemux.mk
	android/id3demux.mk
	android/qtdemux.mk
	android/rtp.mk
	android/rtpmanager.mk
	android/rtsp.mk
	android/soup.mk
	android/udp.mk
	android/wavenc.mk
	android/wavparse.mk
	configure.ac
2011-04-18 10:23:45 +02:00
Tim-Philipp Müller
86d8c8162e v4l2sink: fix another unused-but-set-variable warning 2011-04-16 18:16:11 +01:00
Robert Swain
e02b7e7fdf v4l2src: Address unused but set variable
The v4l2object formats list was being obtained into a local variable and
then still used from the context. Make use of the local variable.
2011-04-16 13:15:03 +01:00
Robert Swain
75886ba63d oss4: Address unused but set variables
GCC 4.6.x complains about such variable usage. Unused but set variables
were removed except that gst_oss4_mixer_slider_set_mute () now returns
the value from the call to gst_oss4_mixer_set_control_val ().
2011-04-16 13:14:57 +01:00
Sebastian Dröge
0b9cf7e47d v4l2radio: Free videodev string before replacing it 2011-04-14 13:38:30 +02:00
David Schleef
8c07e52236 directsoundsink: Add conditionals on WAVE_FORMAT_DOLBY_AC3_SPDIF 2011-04-13 16:53:30 -07:00
Wim Taymans
c124ba1489 Merge branch 'master' into 0.11
Conflicts:
	gst/rtsp/gstrtspsrc.c
2011-04-05 17:20:08 +02:00
Stefan Kost
270dd376bc docs: fix docuemntation warnings (and reindent) 2011-04-05 12:06:55 +03:00
Wim Taymans
8f22a09dc4 Merge branch 'master' into 0.11-fdo 2011-03-28 20:50:59 +02:00
Alexey Chernov
e7a63c34ac v4l2: new v4l2radio element to control analog radio devices
https://bugzilla.gnome.org/show_bug.cgi?id=640118
2011-03-27 20:29:43 +01:00
Wim Taymans
c63dc97adf meta: update for new API 2011-03-08 17:02:30 +00:00
Wim Taymans
a4fdb8ee44 Merge branch 'master' into 0.11
Conflicts:
	tests/examples/cairo/Makefile.am
2011-03-08 10:14:20 +00:00
David Schleef
910a6f0c96 v4l2: Use #ifdefs for V4L2_PIX_FMT_PJPG
It's only recently added to kernel headers.
2011-03-04 18:38:39 -08:00
Wim Taymans
338c300f5f Merge branch 'master' into 0.11 2011-03-04 16:30:36 +01:00
Tim-Philipp Müller
0cd62a10ad v4l2: remove unnecessary linux/videodev.h include
Causes compilation issues with newer kernel headers where the old
v4l interface has been removed.

https://bugzilla.gnome.org/show_bug.cgi?id=643716
2011-03-03 17:37:19 +00:00
Wim Taymans
de1ca68077 v4l2: register metadata 2011-02-28 11:58:49 +01:00
Wim Taymans
9c08bde90b meta: fix for new API 2011-02-28 11:58:49 +01:00
Wim Taymans
f229f4d192 metadata: use metadata for private buffer data
Use buffer metadata to store element private data.
2011-02-28 11:58:49 +01:00
Wim Taymans
d90a388289 miniobject: port to 0.11
Use buffer private data instead of subclassing.
2011-02-28 11:58:48 +01:00
Wim Taymans
759a3507d7 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2011-02-28 11:58:05 +01:00
Thiago Santos
5dac2e5fde v4l2: Add PJPG mapping
Adds mapping of progressive jpeg format
2011-02-15 16:14:25 -03:00
Mark Nauwelaerts
6b86b56abd v4l2: fix interlaced set_format configuration
Commit 6c8268dbfd broke recording
from interlaced v4l2 source (e.g. typical tv capture card) since
V4L2_FIELD_SEQ_TB (with fields stored separately) does not map
to currently defined interlaced format (fields stored interleaved).

Besides this mismatch, hardware might quite likely not support or
appreciate this field value, since querying supported formats mapped
_INTERLACED field formats to interlaced=true caps (so the latter should
not be mapped to field value that is not known to be supported).
2011-02-04 10:49:06 +01:00
Mark Nauwelaerts
564976b609 directsound: arrange for definition of _swab on Cygwin
gstdirectsoundsink.c: In function 'gst_directsound_sink_write':
gstdirectsoundsink.c:557: error: implicit declaration of function '_swab'
gstdirectsoundsink.c:557: error: nested extern declaration of '_swab'
2011-02-01 20:11:06 +01:00
Tim-Philipp Müller
9acda034f8 v4l2sink: fix accidental breakage of navigation interface support 2011-01-20 00:08:18 +00:00
Tim-Philipp Müller
9dcb60822f v4l2: define V4L2_FIELD_INTERLACED_{TB,BT} if not available in header
Older kernels don't have these, and there's no easy way to check for the
existance of enums that doesn't involve a configure check, so just define
these if the V4L2_CAP_VIDEO_OUTPUT_OVERLAY define is not there, which was
added in the same commit as the TB/BT enum. Fixes compilation on CentOS 5.

https://bugzilla.gnome.org/show_bug.cgi?id=639339
2011-01-12 22:41:17 +00:00
Tim-Philipp Müller
09d19e7dcd v4l2sink: don't put functional code like ioctl calls into g_return_if_fail()
These macros will expand to NOOPs given the right defines. Also,
g_return_if_fail() and friends are meant to be used to catch programming
errors (like invalid input to functions), not runtime error handling.
2011-01-07 01:35:45 +00:00
Tim-Philipp Müller
06b68c81b4 v4l2src: undo presumably accidental enablement of the GstXOverlay interface
Looks like this got enabled by accident when adding it to v4l2sink,
so undo this for now. Not sure it makes much sense in a GStreamer
context with current hardware.
2011-01-03 15:16:48 +00:00
Tim-Philipp Müller
b0eb10cc53 v4l2: mark v4l2sink as experimental and build only if --enable-experimental is passed
It's not really of 'good' quality yet, but there's a lot of
code shared with v4l2src, so not so easy to move it elswhere.

https://bugzilla.gnome.org/show_bug.cgi?id=612244
2011-01-02 11:40:29 +00:00
Tim-Philipp Müller
0be6bd355a Revert "v4l2: add norm property"
This reverts commit 9e1d419d07.

Reverting this since it adds unreviewed and bad API to v4l2src
(property of type enum, with seemingly random and unsorted values).
2011-01-02 11:40:28 +00:00
Rob Clark
6c8268dbfd v4l2: add interlaced support 2010-12-29 11:46:42 -06:00
Rob Clark
538d3a959b v4l2sink: add navigation support 2010-12-29 11:46:42 -06:00
Rob Clark
9e1d419d07 v4l2: add norm property
Based on a patch by Guennadi Liakhovetski.
2010-12-29 11:46:42 -06:00
Rob Clark
bb07a39c67 v4l2: cleanup get/set input/output
output devices should use get/set output, and in either case we should
not print a warning message if the ioctl fails but the device does not
claim to support the tuner interface
2010-12-29 11:46:41 -06:00
Rob Clark
bf88547489 v4l2xoverlay: add support to create window
If xoverlay is available, v4l2sink should create a window for the overlay to
display in.

The window automatically tries to make itself as large as possible.
This works well on a small screen, but perhaps should first attempt to use
the size of the video that is played (no scaling).
2010-12-29 11:46:41 -06:00
Rob Clark
ff5494046a v4l2sink: special handling for cases gst_buffer_make_metadata_writable()
Special case check for sub-buffers:  In certain cases, places like
GstBaseTransform, which might check that the buffer is writable before copying
metadata, timestamp, and such, will find that the buffer has more than one
reference to it.  In these cases, they will create a sub-buffer with an offset=0
and length equal to the original buffer size.

This could happen in two scenarios: (1) a tee in the pipeline, and (2) because
the refcnt is incremented in gst_mini_object_free() before the finalize function
is called, and decremented after it returns..  but returning this buffer to the
buffer pool in the finalize function, could wake up a thread blocked in
_buffer_alloc() which could run and get a buffer w/ refcnt==2 before the thread
originally unref'ing the buffer returns from finalize function and decrements
the refcnt back to 1!

This is related to issue #545501
2010-12-29 11:46:41 -06:00
Rob Clark
c3721534c9 v4l2: fix race condition
The size of the buffer would be zero'd out in gst_v4l2_buffer_finalize()
after the buffer is qbuf'd or pushed onto the queue of available buffers..
leaving a race condition where the thread waiting for the buffer could awake
and set back a valid size before the finalizing thread zeros out the length.
This would result that the newly allocated buffer has length of zero.
2010-12-29 11:46:41 -06:00
Rob Clark
34e448980b v4l2sink: add properties to control crop 2010-12-29 11:46:41 -06:00
Rob Clark
67cd90408f v4l2: re-enable x-overlay support 2010-12-29 11:46:41 -06:00
Rob Clark
417b899c44 v4l2sink: fix for PAUSED->READY->PAUSED state transitions
When v4l2sink goes to PAUSED->READY it only stops streaming, so the state
should be set to STATE_PENDING_STREAMON in case the element transitions
back to PLAYING.
2010-12-29 11:46:41 -06:00
Rob Clark
61db502a12 v4l2sink: add "min-queued-bufs" property 2010-12-29 11:46:41 -06:00
Rob Clark
0cec72b97e v4l2sink: Add support for blocking dequeue.
We'd prefer to throttle the decoder if we run out of buffers, to keep a bound
on memory usage.  Also, for OMAP4 it is a requirement of the decoder to not
alternate between memory alloced by the display driver and malloc'd userspace
memory.
2010-12-29 11:46:40 -06:00
Rob Clark
ecfbaf58a5 v4l2: clear flags before reusing buffer from buffer pool
note: this really only affects v4l2sink since gst_v4l2_buffer_pool_get() is
only called once per buffer in the v4l2src case (in
gst_v4l2src_buffer_pool_activate())
2010-12-29 11:46:40 -06:00
Rob Clark
e24cfa7250 v4l2sink: don't render preroll buffers
Most v4l2 drivers will get upset when you queue the same buffer twice in a
row without first dequeueing it.

Rendering of pre-roll buffers can be re-introduced later, but will require
tracking the state of the buffer, and avoiding to re-QBUF if the buffer has
already been passed to the driver.
2010-12-29 11:46:40 -06:00
Rob Clark
48a8b53bdd v4l2sink: Improve behavior for shared buffers.
When the decoder is using pad_alloc(), v4l2sink would behave badly if
the number of buffers ('queue-size' property) was not high enough to
account for all the buffers needed by the decoder, and other elements
(such as queues) between the decoder and v4l2sink.  This patch
slightly increases the default number of buffers, and changes v4l2sink
to drop frames rather than return an error in case the number of
buffers is not high enough.
2010-12-29 11:46:40 -06:00
Rob Clark
60c1a44917 v4l2: fix typo 2010-12-23 16:44:06 -06:00
Edward Hervey
d2a43eb8ff ximagesrc: remote is a boolean (and not uint) property 2010-12-22 21:27:11 +01:00
Vincent Penquerc'h
7ac31b3d22 ximagesrc: change from XGetImage to XGetSubImage dependant on a property
ximagesrc: change from XGetImage to XGetSubImage dependant on a property
 to avoid unnecessary performance hits by default.
2010-12-18 15:35:19 +01:00
Vincent Penquerc'h
ac872f61cf ximagesrc: use XGetSubImage instead of XGetImage, works with remote X
ximagesrc: use XGetSubImage instead of XGetImage, works with remote X
 (on my setup anyway...)
2010-12-18 15:35:09 +01:00
Vincent Penquerc'h
fbd9581f87 ximagesrc: fix various width/height calculations being off by one,
ximagesrc: fix various width/height calculations being off by one,
 and make it so a single pixel width/height can be captured (except
 the top left one, as 0,0,0,0 is reserved for full screen as per
 the property comments).
2010-12-18 15:34:59 +01:00
Rob Clark
66387181ac fix compile errors on macosx
with i686-apple-darwin10-gcc-4.2.1:

gstv4l2object.c: In function 'gst_v4l2_object_get_nearest_size':
gstv4l2object.c:1988: warning: format '%u' expects type 'unsigned int', but argument 12 has type 'gint *'
gstv4l2object.c:1988: warning: format '%u' expects type 'unsigned int', but argument 13 has type 'gint *'
2010-12-17 19:19:35 -06:00
Wim Taymans
22443cfb13 v4l2: don't abuse the class lock
Use a new static lock to protect the probed device list instead of the object
class lock.
2010-12-07 11:40:58 +01:00
Janne Grunau
ab69275f4d v4l2src: set top field first for interlaced buffers if v4l2 exports it
https://bugzilla.gnome.org/show_bug.cgi?id=634393
2010-12-04 16:42:21 +00:00
Janne Grunau
351ac54822 v4l2src: check field information and set interlaced caps accordingly
Reject the format if the field type is not supported.

https://bugzilla.gnome.org/show_bug.cgi?id=634391
2010-12-04 16:39:35 +00:00
Stefan Kost
d8167e3071 various (gst): add a missing G_PARAM_STATIC_STRINGS flags 2010-10-13 18:00:28 +03:00
Stefan Kost
77b656eec1 various (sys): add a missing G_PARAM_STATIC_STRINGS flags 2010-10-13 17:39:36 +03:00
IOhannes m zmölnig
b37845dac0 v4l2sink: Only get/set overlay params if needed
it's perfectly ok for a video output device to not have overlay capabilities.
this patch removes the need to get/set the overlay parameters if the user
does not explicitely request one of the overlay properties
2010-10-10 11:23:39 +02:00
IOhannes m zmölnig
4ba93e9f1a v4l2sink: Protect against NULL-pointer access
gst_v4l2sink_change_state() would free the pool without checking whether there
was a valid pool...
2010-10-10 11:23:39 +02:00
Philippe Normand
672bfc3369 v4l2: use the xoverlay APIs 2010-09-21 13:40:33 +02:00
Philippe Normand
720369c06e osxvideosink: use the new xoverlay APIs
Also bumped -base requirements.
2010-09-21 13:40:33 +02:00
Tim-Philipp Müller
601b993f95 docs: add gtk-doc chunks with Since: markers for new v4l2src properties 2010-09-15 17:05:30 +01:00
Stefan Kost
1f4f4581d8 v4l2src: don't skip calculating the duration 2010-09-10 17:00:58 +03:00
Stefan Kost
a08d4a5447 v4l2src: add controlable colorbalance parameters
Expose colorbalance controls as object properties (like we do on xvimagesink).
Make them controlable.
2010-09-10 17:00:58 +03:00
David Schleef
178c57be4f v4l2src: add decimate property 2010-09-04 12:39:26 -07:00
Sjoerd Simons
e9a30e454a v4l2src: Use GstBaseSrc::block-size as fallback size 2010-09-04 14:52:11 +02:00
Sjoerd Simons
74d7521a7c v4l2src: Fix using mpegts via the mmap interface
MPEG doesn't have a static size per frame, so don't pretend it has one
and fail when capturing because it doesn't match. Instead mark the size
as unknown and let the read frame grabbing method use a reasonable fallback
value (assuming that's only for actual streaming formats)

Fixes bug #628349.
2010-09-04 14:52:11 +02:00
Tim-Philipp Müller
6321d9910d v4l2src: also log pixel formats in sorted order 2010-08-06 20:07:26 +01:00
Sjoerd Simons
dcea1b2dfc v4l2: sort formats in the right order so that non-emulated formats are prefered
The format list should be sorted from high ranks to low ranks. In the GSList
sorting function this means the compare needs to return a positive value if
format a has a lower rank than format b.

Among other things this fixes v4l2src to prefer non-emulated formats
to emulated formats when built against libv4l.
2010-08-06 20:07:21 +01:00
Michael Grzeschik
34c7cabe2c v4l2sink: destroy buffer pool when changing state to NULL
In the case we change the State from READY_TO_NULL the buffers in the pool
still hold an open dup file descriptor to the device, therefore the device
release function will not be called and the device will probably answer with
-EBUSY when we reopen it in the next NULL_TO_READY transition.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

See bug #622500 and #612244.
2010-07-06 11:03:39 +01:00
Stefan Kost
23106e243b v4l2: precalculate duration
Have frame duration in the instance struct and calculate it after changing the caps.
2010-06-22 15:46:51 +03:00
Stefan Kost
ac8e87bb2c v4l2sink: use glib defines in property declarations for readability 2010-06-21 12:19:59 +03:00
Stefan Kost
f9fe85dbb2 v4l2: use G_PARAM_STATIC_STRINGS to save a few bytes and strdups 2010-06-21 12:19:59 +03:00
Sebastian Dröge
34d42e4ea3 ximagesrc: Fix NULL pointer dereference when allocation of the ximage fails 2010-06-16 19:30:25 +02:00
Havoc Pennington
f06b105058 v4l2src: do not try to change device format if it's already correct
This allows set_caps to succeed if caps change in a way that
would not modify the format we're getting from the hardware.
Otherwise if not in NULL state, setting caps would fail
with EBUSY.

With this change, in some cases it's OK to go PLAYING->READY->PLAYING
rather than PLAYING->NULL->PLAYING to avoid a time-consuming close
and reopen of the device.

Fixes #621723
2010-06-16 17:48:47 +02:00
Havoc Pennington
9b9f9d0a2a v4l2src: in negotiate, check for error return from set_caps
Fixes #621723  (partially)

set_caps can fail if the video device is running, in that case
setting its format leads to EBUSY.

If set_caps fails then we will not have set up the buffer pool
(it will be NULL) which leads to a crash when we try to pull
buffers. If we fail the negotiate on set_caps failure, then we
won't go to playing state and won't crash.

This is a small improvement. Of course, a nicer fix would
be to make set_caps work in the case where the format is
unchanged. If the format has changed, failing is
probably correct because we need to close the device
(go to NULL state) in order to set caps.
2010-06-16 17:48:47 +02:00
Sebastian Dröge
acd0c1ff90 v4l2: Initialize variable 2010-06-15 19:47:16 +02:00
Sebastian Dröge
a88acc848e oss4: Use g_ascii_strcasecmp() instead of the deprecated g_strcasecmp() 2010-06-14 13:48:28 +02:00
David Schleef
3478f31664 v4l2src: Fix element description 2010-06-11 16:24:15 -07:00
Julien Moutte
055586f2d9 directsoundsink: Plug some memleak and support 22050Hz mono sound.
Segment size needs to be a multiple of the sample size in bytes.
2010-06-09 20:07:09 +02:00
Sebastian Dröge
2ffcb159d7 sys: Don't use GST_DEBUG_FUNCPTR for GObject vfuncs 2010-06-06 17:57:03 +02:00
Tim-Philipp Müller
972631ae6d oss4: add some comments for translators to clarify meaning of "Low"
"Low" etc. are quality settings here (e.g. for the internal resampler).
Some day when we use GLib's i18n functions we might want to use
NC_() and g_dpgettext2() here instead of the comments.

Fixes #555967.
2010-06-03 20:23:48 +01:00
Alessandro Decina
3fdd51952b osxvideosink: allow switching views at runtime. 2010-05-11 22:30:03 +02:00
Tim-Philipp Müller
d56126931f oss4: minor cleanup
Remove fixed FIXME, change finalise to finalize for consistency.
2010-05-11 19:05:08 +01:00
Tim-Philipp Müller
1732ce033a Move oss4 plugin from -bad to -good
Hook up build infrastructure, docs and tests.

Fixes #614305.
2010-05-11 19:02:55 +01:00
Brian Cameron
02a226f746 oss4sink: implement GstStreamVolume interface and add mute and volume properties
OSS4 supports per-stream volume control, so expose this using the right
API, so that playbin2 and applications like totem can make use of it
(instead of using a volume element for volume control).

Fixes #614305.
2010-05-11 19:02:55 +01:00
Tim-Philipp Müller
719515126c oss4: 8-bit PCM audio caps don't need an endianness field 2010-05-11 19:02:55 +01:00
Tim-Philipp Müller
4d658c188c oss4: don't iterate the formats table twice for each entry
When iterating the formats table, we can just pass the whole
entry to our helper function, which avoids iterating the table
again to find the entry structure from the passed format id.
2010-05-11 19:02:55 +01:00
Tim-Philipp Müller
59120a0222 oss4: also accept formats not natively supported
Also accept formats that are not natively supported by the
hardware, OSS4 can convert them internally. List the native
formats first in the caps though, to express our preference
for the native formats. We need this in order to support the
case properly where the audio hardware supports only e.g.
little endian PCM, but the host is big endian, since many
audio elements only support native endianness and make the
reasonable assumption that any audiosink will be able to
handle audio in native endianness.

Based on patch by Jerry Tan <jerry.tan@sun.com>

Fixes #614317.
2010-05-11 19:02:55 +01:00
Tim-Philipp Müller
3b1347260f oss4: add comment for translators
Not that that will make these strings much better. Also remove i18n
marker where it doesn't make sense.
2010-05-11 19:02:54 +01:00
Benjamin Otte
ab5f546143 oss4: Refactor code to make it look more modern
A side effect is that it passes -Wformat-nonliteral and doesn't read
invalid memory in some cases, like when the mixer track contains
a % sign or there is a number but not a known mixer name.
2010-05-11 19:02:54 +01:00
Benjamin Otte
85124337dc oss4: Avoid g_quark_to_string (g_quark_from_string ()) madness
We to the strdup inside gst_oss4_mixer_control_get_translated_name()
instead of in the only caller.
2010-05-11 19:02:54 +01:00
Benjamin Otte
6c916a144d Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-05-11 19:02:54 +01:00
Benjamin Otte
117485973a Fix compiler warning about unused return value 2010-05-11 19:02:54 +01:00
Jan Schmidt
039604b11f oss4: Attempt to fix a compiler warning
Don't store a const gchar * in a non-const gchar * local var.

Also, make the translation string function static since it's only
used in the one file.
2010-05-11 19:02:54 +01:00
Garrett D'Amore
2a402de32d oss4: Enhancements to the mixer and audio output
Code cleanups, general improvements, support for the
new mixer flags in latest gst-plugins-base.

Fixes: #584252
Patch By: Brian Cameron <brian.cameron@sun.com>
Patch By: Garrett D'Amore <garrett.damore@sun.com>
2010-05-11 19:02:54 +01:00
Tim-Philipp Müller
0453094fbb Make build without warnings with debugging disabled 2010-05-11 19:02:54 +01:00
Stefan Kost
5ac46548ca Don't install static libs for plugins. Fixes #550851 for -bad.
Original commit message from CVS:
* ext/alsaspdif/Makefile.am:
* ext/amrwb/Makefile.am:
* ext/apexsink/Makefile.am:
* ext/arts/Makefile.am:
* ext/artsd/Makefile.am:
* ext/audiofile/Makefile.am:
* ext/audioresample/Makefile.am:
* ext/bz2/Makefile.am:
* ext/cdaudio/Makefile.am:
* ext/celt/Makefile.am:
* ext/dc1394/Makefile.am:
* ext/dirac/Makefile.am:
* ext/directfb/Makefile.am:
* ext/divx/Makefile.am:
* ext/dts/Makefile.am:
* ext/faac/Makefile.am:
* ext/faad/Makefile.am:
* ext/gsm/Makefile.am:
* ext/hermes/Makefile.am:
* ext/ivorbis/Makefile.am:
* ext/jack/Makefile.am:
* ext/jp2k/Makefile.am:
* ext/ladspa/Makefile.am:
* ext/lcs/Makefile.am:
* ext/libfame/Makefile.am:
* ext/libmms/Makefile.am:
* ext/metadata/Makefile.am:
* ext/mpeg2enc/Makefile.am:
* ext/mplex/Makefile.am:
* ext/musepack/Makefile.am:
* ext/musicbrainz/Makefile.am:
* ext/mythtv/Makefile.am:
* ext/nas/Makefile.am:
* ext/neon/Makefile.am:
* ext/ofa/Makefile.am:
* ext/polyp/Makefile.am:
* ext/resindvd/Makefile.am:
* ext/sdl/Makefile.am:
* ext/shout/Makefile.am:
* ext/snapshot/Makefile.am:
* ext/sndfile/Makefile.am:
* ext/soundtouch/Makefile.am:
* ext/spc/Makefile.am:
* ext/swfdec/Makefile.am:
* ext/tarkin/Makefile.am:
* ext/theora/Makefile.am:
* ext/timidity/Makefile.am:
* ext/twolame/Makefile.am:
* ext/x264/Makefile.am:
* ext/xine/Makefile.am:
* ext/xvid/Makefile.am:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/dshow/Makefile.am:
* gst/aiffparse/Makefile.am:
* gst/app/Makefile.am:
* gst/audiobuffer/Makefile.am:
* gst/bayer/Makefile.am:
* gst/cdxaparse/Makefile.am:
* gst/chart/Makefile.am:
* gst/colorspace/Makefile.am:
* gst/dccp/Makefile.am:
* gst/deinterlace/Makefile.am:
* gst/deinterlace2/Makefile.am:
* gst/dvdspu/Makefile.am:
* gst/festival/Makefile.am:
* gst/filter/Makefile.am:
* gst/flacparse/Makefile.am:
* gst/flv/Makefile.am:
* gst/games/Makefile.am:
* gst/h264parse/Makefile.am:
* gst/librfb/Makefile.am:
* gst/mixmatrix/Makefile.am:
* gst/modplug/Makefile.am:
* gst/mpeg1sys/Makefile.am:
* gst/mpeg4videoparse/Makefile.am:
* gst/mpegdemux/Makefile.am:
* gst/mpegtsmux/Makefile.am:
* gst/mpegvideoparse/Makefile.am:
* gst/mve/Makefile.am:
* gst/nsf/Makefile.am:
* gst/nuvdemux/Makefile.am:
* gst/overlay/Makefile.am:
* gst/passthrough/Makefile.am:
* gst/pcapparse/Makefile.am:
* gst/playondemand/Makefile.am:
* gst/rawparse/Makefile.am:
* gst/real/Makefile.am:
* gst/rtjpeg/Makefile.am:
* gst/rtpmanager/Makefile.am:
* gst/scaletempo/Makefile.am:
* gst/sdp/Makefile.am:
* gst/selector/Makefile.am:
* gst/smooth/Makefile.am:
* gst/smoothwave/Makefile.am:
* gst/speed/Makefile.am:
* gst/speexresample/Makefile.am:
* gst/stereo/Makefile.am:
* gst/subenc/Makefile.am:
* gst/tta/Makefile.am:
* gst/vbidec/Makefile.am:
* gst/videodrop/Makefile.am:
* gst/videosignal/Makefile.am:
* gst/virtualdub/Makefile.am:
* gst/vmnc/Makefile.am:
* gst/y4m/Makefile.am:
* sys/acmenc/Makefile.am:
* sys/cdrom/Makefile.am:
* sys/dshowdecwrapper/Makefile.am:
* sys/dshowsrcwrapper/Makefile.am:
* sys/dvb/Makefile.am:
* sys/dxr3/Makefile.am:
* sys/fbdev/Makefile.am:
* sys/oss4/Makefile.am:
* sys/qcam/Makefile.am:
* sys/qtwrapper/Makefile.am:
* sys/vcd/Makefile.am:
* sys/wininet/Makefile.am:
* win32/common/config.h:
Don't install static libs for plugins. Fixes #550851 for -bad.
2010-05-11 19:02:54 +01:00
Jan Schmidt
11c7f35104 sys/oss4/: Add some spaces in translateable strings.
Original commit message from CVS:
* sys/oss4/oss4-mixer.c:
* sys/oss4/oss4-sink.c:
* sys/oss4/oss4-source.c:
Add some spaces in translateable strings.
Fixes: #555969 #555968 #555965
2010-05-11 19:02:54 +01:00
Frederic Crozat
33a70cfad0 Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#546822).
Original commit message from CVS:
Patch by: Frederic Crozat <fcrozat@mandriva.org>
* ext/sndfile/gstsf.c: (plugin_init):
* sys/dvb/gstdvbsrc.c: (gst_dvbsrc_plugin_init):
* sys/oss4/oss4-audio.c: (plugin_init):
Make sure gettext returns translations in UTF-8 encoding rather
than in the current locale encoding (#546822).
2010-05-11 19:02:53 +01:00
Stefan Kost
f8c76291da Final round of doc updates.
Original commit message from CVS:
* gst/rtpmanager/gstrtpjitterbuffer.c:
* gst/speed/gstspeed.c:
* gst/speexresample/gstspeexresample.c:
* gst/videosignal/gstvideoanalyse.c:
* gst/videosignal/gstvideodetect.c:
* gst/videosignal/gstvideomark.c:
* sys/dvb/gstdvbsrc.c:
* sys/oss4/oss4-mixer.c:
* sys/oss4/oss4-sink.c:
* sys/oss4/oss4-source.c:
* sys/wininet/gstwininetsrc.c:
Final round of doc updates.
2010-05-11 19:02:53 +01:00
Stefan Kost
adda5d4859 Do not use short_description in section docs for elements. We extract them from element details and there will be war...
Original commit message from CVS:
* ext/dc1394/gstdc1394.c:
* ext/ivorbis/vorbisdec.c:
* ext/jack/gstjackaudiosink.c:
* ext/metadata/gstmetadatademux.c:
* ext/mythtv/gstmythtvsrc.c:
* ext/theora/theoradec.c:
* gst-libs/gst/app/gstappsink.c:
* gst/bayer/gstbayer2rgb.c:
* gst/deinterlace/gstdeinterlace.c:
* gst/rawparse/gstaudioparse.c:
* gst/rawparse/gstvideoparse.c:
* gst/rtpmanager/gstrtpbin.c:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpjitterbuffer.c:
* gst/rtpmanager/gstrtpptdemux.c:
* gst/rtpmanager/gstrtpsession.c:
* gst/rtpmanager/gstrtpssrcdemux.c:
* gst/selector/gstinputselector.c:
* gst/selector/gstoutputselector.c:
* gst/videosignal/gstvideoanalyse.c:
* gst/videosignal/gstvideodetect.c:
* gst/videosignal/gstvideomark.c:
* sys/oss4/oss4-mixer.c:
* sys/oss4/oss4-sink.c:
* sys/oss4/oss4-source.c:
Do not use short_description in section docs for elements. We extract
them from element details and there will be warnings if they differ.
Also fixing up the ChangeLog order.
2010-05-11 19:02:53 +01:00
Tim-Philipp Müller
385cd9a804 sys/oss4/: Make device-name probing in NULL state work better (e.g. for the gnome-control-center sound capplet).
Original commit message from CVS:
* sys/oss4/oss4-mixer.c: (gst_oss4_mixer_open):
* sys/oss4/oss4-property-probe.c:
(gst_oss4_property_probe_find_device_name),
(gst_oss4_property_probe_find_device_name_nofd):
* sys/oss4/oss4-property-probe.h:
* sys/oss4/oss4-sink.c: (gst_oss4_sink_get_property):
* sys/oss4/oss4-source.c: (gst_oss4_source_get_property):
Make device-name probing in NULL state work better (e.g. for the
gnome-control-center sound capplet).
2010-05-11 19:02:53 +01:00
Clive Wright
0e4d8ef5fe sys/oss4/oss4-mixer-slider.c: Apparently mono sliders have the mono value repeated in the upper bits, so mask those o...
Original commit message from CVS:
Based on patch by: Clive Wright <clive_wright ntlworld com>
* sys/oss4/oss4-mixer-slider.c: (gst_oss4_mixer_slider_unpack_volume):
Apparently mono sliders have the mono value repeated in the upper bits,
so mask those out when reading them. Probably makes the mixer applet
work properly in some more cases.
2010-05-11 19:02:53 +01:00
Julien Moutte
b33c37c256 sys/oss4/: Fix arguments format in debug statements.
Original commit message from CVS:
2008-04-11  Julien Moutte  <julien@fluendo.com>

* sys/oss4/oss4-mixer-enum.c:
(gst_oss4_mixer_enum_get_values_locked):
* sys/oss4/oss4-source.c: (gst_oss4_source_delay): Fix arguments
format in debug statements.
2010-05-11 19:02:53 +01:00
Tim-Philipp Müller
5f73998ac8 Add initial support for OSSv4. Mixer still needs a bit more love, but even magic has its limits.
Original commit message from CVS:
* configure.ac:
* sys/Makefile.am:
* sys/oss4/Makefile.am:
* sys/oss4/oss4-audio.c:
* sys/oss4/oss4-audio.h:
* sys/oss4/oss4-mixer-enum.c:
* sys/oss4/oss4-mixer-enum.h:
* sys/oss4/oss4-mixer-slider.c:
* sys/oss4/oss4-mixer-slider.h:
* sys/oss4/oss4-mixer-switch.c:
* sys/oss4/oss4-mixer-switch.h:
* sys/oss4/oss4-mixer.c:
* sys/oss4/oss4-mixer.h:
* sys/oss4/oss4-property-probe.c:
* sys/oss4/oss4-property-probe.h:
* sys/oss4/oss4-sink.c:
* sys/oss4/oss4-sink.h:
* sys/oss4/oss4-soundcard.h:
* sys/oss4/oss4-source.c:
* sys/oss4/oss4-source.h:
Add initial support for OSSv4. Mixer still needs a bit more love,
but even magic has its limits.
2010-05-11 19:02:53 +01:00
Alessandro Decina
5f9f71b38e osxvideosink: implement the xoverlay interface. Fixes #618349. 2010-05-11 19:58:00 +02:00
Stefan Kost
b62d781516 oss: add fixme comment 2010-04-04 22:29:13 +03:00
Tim-Philipp Müller
d756bab488 build: build plugins and examples in parallel where possible 2010-03-29 11:00:57 +01:00
Tim-Philipp Müller
b9814cd902 directsoundsink: fix redundant function redeclaration compiler warnings
Re-apply this again as well, as it was undone by the previous commit..
2010-03-27 09:05:50 +00:00
Benjamin Otte
7bd8740843 gst_element_class_set_details => gst_element_class_set_details_simple
Apply this again, as it was overwritten by the previous commit. Merging
is hard, apparently.
2010-03-27 09:05:00 +00:00
Julien Moutte
0e3c190d75 directsoundsink: Implement SPDIF support for AC3.
Detect if the sound card supports SPDIF passthru of AC3 and add
necessary code to support that like alsasink.
2010-03-26 23:20:10 +01:00
Tristan Matthews
53370fc899 osx: fix compiler warnings
Added void parameter to avoid old-style definition warning.
Added -Wno-aggregate-return flag to avoid erroneous aggregate return warning.

https://bugzilla.gnome.org/show_bug.cgi?id=613663
2010-03-23 08:23:09 +01:00
Benjamin Otte
3f511ec361 Add -Wwrite-strings to the configure flags
... and fix all warnings
2010-03-21 14:17:47 +01:00
Tim-Philipp Müller
073201b329 build: Makefile.am cleanups
Mostly add $(GST_BASE_CFLAGS) where it was missing, but also fix up
order of flags and libs if needed (see docs/random/moving-plugins).
2010-03-18 21:34:24 +00:00
Tim-Philipp Müller
0efaf327c2 directsoundsink: fix redundant function redeclaration compiler warnings 2010-03-18 18:49:24 +00:00
Benjamin Otte
cccfeaa59c gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 14:32:00 +01:00
Benjamin Otte
1055aaa9cb Add -Wredundant-decls warning flag
Also fix compile issues
2010-03-17 19:35:10 +01:00
Benjamin Otte
3342b1679e Add -Wmissing-declarations -Wmissing-prototypes warning flags
And fix all the warnings.
2010-03-17 18:23:28 +01:00
Thadeu Lima de Souza Cascardo
aa26b09c1c ximagesrc: send new_segment with GST_FORMAT_TIME format
Instead of using BaseSrc default format GST_FORMAT_BYTES, send it in
GST_FORMAT_TIME.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

Fixes #611659
2010-03-10 09:41:06 -03:00
Stefan Kost
0134e950fa v4l2: log more details in buffer pool finalize
Helps to align with the loggin from libv4l.
2010-02-16 10:15:22 +02:00
Stefan Kost
f94bfc65a5 v4l2: init datastructures after pre-conditions checks 2010-02-16 10:15:22 +02:00
Tim-Philipp Müller
2baa107562 v4l2: printf format string fix
The compiler wants a cast here even though the type is already
typedefed as 64-bit integer (presumably because glib has typedefed
guint64 to unsigned long here).
2010-02-15 12:13:43 +00:00
Tim-Philipp Müller
532bbf36ee v4l2sink: change rank to NONE so it is never autoplugged 2010-02-13 20:59:42 +00:00
Tim-Philipp Müller
114ba3dc6e v4lsink: lower rank to MARGINAL 2010-02-12 15:56:01 +00:00
Tim-Philipp Müller
5290b514c8 v4l2: fix unportable printf format 2010-02-01 09:18:53 +00:00
Stefan Kost
21a8cb1e06 v4l2src: don't deref NULL
Error out when the pool gets shutdown.
2010-01-25 17:23:43 +02:00
Stefan Kost
8576a11dae Revert "v4l2src: don't deref NULL"
This reverts commit 3d9d34bd60.
2010-01-25 17:21:13 +02:00
Stefan Kost
3d9d34bd60 v4l2src: don't deref NULL
Error out when the pool gets shutdown.
2010-01-25 14:16:22 +02:00
Stefan Kost
30b2cd42c5 v4l2: move G_END_DECLS to the end 2010-01-18 14:57:42 +02:00
Stefan Kost
e789d2253f v4l2: fix bufferpool file names in header comment 2010-01-18 14:55:38 +02:00
Tim-Philipp Müller
d68689255d v4l2src: fix memory leak in new uri handler code
Don't leak a string everytime get_uri() is called and a device
has been set. There's a limited number of devices, so just
intern the string instead of doing more elaborate housekeeping
and storing it in the instance struct or so.
2010-01-05 09:49:16 +00:00
Edward Hervey
121c001437 v4l2src: Add GstURIHandler interface. Fixes #601143
This allows using v4l2://[<device>]
2009-12-21 13:54:40 +01:00
Sebastian Dröge
7ef43f021b v4l2: Make sure to initialize variables before using them 2009-11-11 10:45:23 +01:00
Michael Smith
8991a713a7 osxvideosink: Create the video NSView in READY->PAUSED rather than NULL->READY 2009-10-23 18:31:14 -07:00
Michael Smith
2da535f56f osxvideo: explicitly link to GST_LIBS 2009-10-23 18:28:22 -07:00
Thiago Santos
72af90ae31 v4l2src: Set duration on buffers
Use framerate to estimate duration of buffers.

Fixes #590362
2009-10-14 08:00:49 -03:00
Josep Torra
3f7aed54f9 osxvideo: fix a warning doing a cast 2009-10-09 12:14:22 +02:00
Josep Torra
b3e5dcc5f7 osxaudio: fix warnings on macosx 2009-10-09 12:11:12 +02:00
Josep Torra
dd8fd4de58 osxaudio: Fixes build on macosx snow leopard. 2009-10-09 11:43:44 +02:00
Pau Garcia i Quiles
f10435580f v4l2: Include sys/ioctl.h for the V4L ioctl requests
Old videodevice2.h kernel headers used ioctl stuff without
including ioctl.h, making compilation fail on older systems.

Note: Including ioctl.h here is only a workaround for old kernel
headers, should be removed once everybody has new enough headers.

Fixes bug #597867.
2009-10-09 11:34:16 +02:00
Sjoerd Simons
8b9799aeb1 oss: Downgrade the rank of osssrc to SECONDARY
which is the same rank as osssink has.

Fixes bug #597730.
2009-10-08 13:16:11 +02:00
David Schleef
19ae44f4e0 osxaudio: link against GST_BASE_LIBS 2009-09-16 13:28:27 -07:00
Stefan Kost
00ffa9c2dd v4l2src: add a function pointer for get_frame function and optimize a bit
Use a function-pointer for mmap/read, as this can't change during capture. Also
sprinkle a few G_LIKELY/UNLIKELY to improve the error-less code path.
2009-09-11 22:24:47 +03:00
Stefan Kost
1a945a32cc v4l2: log buffer copies on queue underrun in perf category
v4l2src has a slow path where it does buffer-copies when it runs out of queued
buffers. Log this to performance category to help monitoring it.
2009-09-11 22:19:23 +03:00
Stefan Kost
0a68003efe docs: fix gtk-doc warnings 2009-09-10 10:26:23 +03:00
Wim Taymans
5580571f8d whitespace fixes 2009-09-09 10:27:55 +02:00
Wim Taymans
796dec5920 v4l2src: add support for mpeg formats 2009-09-07 18:28:51 +02:00
David Schleef
55d2754098 Remove Ronald Bultje from Authors field
Replaced with "GStreamer maintainers
<gstreamer-devel@lists.sourceforge.net>" or just removed,
depending on the number of other authors.
2009-09-05 20:53:10 -07:00
Sebastian Dröge
686f8376a8 v4l2: Define V4L2_FMT_FLAG_EMULATED if it's not defined yet
libv4l2 already uses this flag, even on Linux kernel versions
before 2.6.32.
2009-09-04 09:32:42 +02:00
Sebastian Dröge
0c6fba9506 v4l2: Fix stupid typo in last commit 2009-09-03 20:40:17 +02:00
Sebastian Dröge
4fda384a83 v4l2: Put emulated formats behind native formats
Fixes bug #593764.
2009-09-03 20:39:44 +02:00
Hans de Goede
10d41286d5 v4l2src: fix 'hang' with some cameras caused by bad timestamping if no framerate is available
For cameras/drivers that don't support e.g. VIDIOC_G_PARM we'd end up without
a framerate and would try to divide by 0, causing run-time warnings and all
frames to be timestamped with 0, which makes sinks that sync against the clock
drop them, causing 'hangs' (observed with the pwc driver and a Logitech QuickCam
Pro 4000). So if we do not know the framerate, simply don't adjust the
timestamps. Fixes #591451.
2009-08-14 13:30:31 +01:00
Filippo Argiolas
a3a61f8940 v4l2src: clear format list in READY->NULL
Clear format list and probed caps when going to NULL so if a new device
is set we'll probe the formats again instead of using previously
detected ones. Fixes bug #591747.
2009-08-14 10:15:43 +02:00
Tim-Philipp Müller
9590df3c2e v4l2: fix make distcheck by disting some more headers 2009-08-11 03:08:01 +01:00
Tim-Philipp Müller
8c8e6af45b v4l2src: if max == min width/height put an int in the probed caps, not an int range
Fixes #560033.
2009-08-09 14:19:42 +01:00
Tim-Philipp Müller
6df8fb76ef osxaudiosrc: if max_channels == min_channels, use an int instead of an int range in the caps 2009-08-09 13:58:07 +01:00
Sebastian Dröge
198604c108 v4l2: Directly use GST_PTR_FORMAT for printing caps with the LOG_CAPS macro 2009-08-04 14:45:31 +02:00
Sebastian Dröge
23dbb15ff5 v4l2: Remove some OMAP specific hacks
They require special build flags and are not useful in general.
2009-08-04 09:32:07 +02:00
Rob Clark
99e2ac121d v4l2sink: change where buffers get dequeued
It seems to cause strange occasional high latencies (almost 200ms) when dequeuing buffers from _buffer_alloc().  It is simpler and seems to work much better to dqbuf from the same thread that is queuing the next buffer.
2009-08-04 09:22:29 +02:00
Rob Clark
f19cfbda96 v4l2: Add v4l2sink element
This also does the following changes:
(1) pull the bufferpool code out into gstv4l2bufferpool.c, and make a
    bit more generic so it can be used both for v4l2src and v4l2sink
(2) move some of the device probing/configuration/caps stuff into
    gstv4l2object.c so it does not have to be duplicated between
    v4l2src and v4l2sink

Fixes bug #590280.
2009-08-04 09:16:56 +02:00
Elaine Xiong
085f87d85f v4l2: Fix v4l2src on OpenSolaris
The v4l2 driver for USB webcams on OpenSolaris does not support select()
calls. Detect when select() fails, and skip polling the device afterward,
which restores the pre 0.10.14 behaviour on OpenSolaris.

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
2009-07-19 11:42:13 +01:00
Filippo Argiolas
946c20a8ba v4l2src: optional support for device probing with gudev
Enumerate v4l2 devices using gudev if available.

Fixes bug #583640.
2009-07-13 16:16:05 +02:00
Tim-Philipp Müller
2e13b85a01 waveformsink: use 'guint8' instead of 'byte' to fix compilation with MSVC8
We need a cast here for pointer arithmetic to work correctly, but some
MSVC versions don't seem to like 'byte', so use guint8 here. Hopefully
fixes #585361.
2009-06-25 18:54:06 +01:00
Stefan Kost
5d256c201f v4l2src: set structs to zero before using them in ioctls
This fixes valgrind warnings.
2009-06-25 19:44:21 +03:00
Stefan Kost
0b475ba774 v4l2: open/close the device in READY
This allows to query the device in READY. Before one need to switch it to PAUSED
and that also starts streaming.
2009-06-22 16:24:46 +03:00
Jan Schmidt
7994f64006 sunaudio: Fix switch setting on some devices. Add debug. Fix a FIXME.
Fix the setting of toggle switches on some broken audio drivers which
report that no audio ports are settable by ignoring the mod_port field
there.

Add some debug statements.

Fix a FIXME now that Good relies on a new enough gst-plugins-base.
2009-06-05 16:54:48 +01:00
Jan Schmidt
0fc43060e5 sunaudio: Support new flags for options and actions
Use new audio mixer flags added in Base 0.10.23 to expose flags and options
on the SunAudio devices.

Fixes: #583593
Patch By: Brian Cameron <brian.cameron@sun.com>
Patch By: Garrett D'Amore <garrett.damore@sun.com>
2009-06-05 10:47:53 +01:00
Stefan Kost
751f7fc5f8 v4l2: cleanup and commenting
Remove newlines inserted by gst-indent once. Remove unused var from instance
struct. Add comments. Add another #define for default property value.
2009-05-26 16:29:46 +03:00
Jan Schmidt
bba3e90768 Moved 'directdraw' from -good to -bad 2009-05-16 01:11:33 +01:00
James Andrewartha
2410cd7a00 Fix compiler warnings
Fixes bug #582715.
2009-05-15 15:14:52 +02:00
Edward Hervey
bd4f8576fe osxringbuffer: Run gst-indent. 2009-04-18 18:51:28 +02:00
Edward Hervey
14f715f978 ximage: Remove dead assignments.
Those variables are not read after that point.
2009-04-18 18:51:28 +02:00
Edward Hervey
0cb5b42d54 Remove trivial unused variables detected by CLang static analyzer. 2009-04-18 18:51:28 +02:00
Edward Hervey
4a9e80720a Remove unused variables in _class_init
Detected by LLVM's CLang static analyzer
2009-04-18 18:51:27 +02:00
Tim-Philipp Müller
cdeb8ebb13 sunaudio: fix broken indentation of variable declarations 2009-04-15 19:33:16 +01:00
James Andrewartha
4a74e341ec sunaudio: remove some unused variables and goto labels
Fixes #579070.
2009-04-15 19:30:11 +01:00
Stefan Kost
ad5702d492 v4l2src: move duplicated timestamping and buffer metadata code to _create()
This will include the latency changes also in the mmap case.
2009-03-25 10:08:41 +02:00
Stefan Kost
652a7fb91f v4l2src: remove win32 ifdefs introduced by commit cff3f46760eac74c9bbd7a36aca44fedf327424b
V4l2src is under sys and does not exists/run under windows anyway.
2009-03-25 10:06:48 +02:00
Stefan Kost
1d16c9cc27 v4l2src: log details if we have them, needed for #575391 2009-03-15 23:26:56 +02:00
Jan Schmidt
a32581abee v4l2src: Prepend to lists and reverse them at the end.
Gratuitous micro-optimisation - prepend to lists and reverse them, rather
than appending to them each time.
2009-03-13 15:43:52 +00:00
Stefan Kost
f86b485f3b v4l2src: fix pads, so that they are subset of template caps
Do not add w=0 | h=0. When we can't get a framerate add fraction range.
2009-03-06 21:57:53 +02:00
David Schleef
0083b9e405 Remove hardcoded definition of OBJC 2009-03-01 12:47:37 -08:00
Sjoerd Simons
b6755a7000 Wait for a frame to become available before capturing it
Use GstPoll to wait for the fd of the video device to become readable before
trying to capture a frame. This speeds up stopping v4l2src a lot as it no
longer has to wait for the next frame, especially when capturing with low
framerates or when the video device just never generates a frame (which seems a
common issue for uvcvideo devices)

Fixes bug #563574.
2009-03-01 19:55:26 +01:00
LRN
27d1ef8a86 directdrawsink: Fix type mismatches
Fixes bug #573343.
2009-02-27 20:40:31 +01:00
Wim Taymans
04359c8382 Conditionally compile code for YVYU
Only compile the code for the YVYU format when the format is actually defined.
Spotted by tmatth on IRC.
2009-02-23 19:53:58 +01:00
Levente Farkas
d2fc4cb3ba v4l2src: Make sort_by_frame_size conditionally compiled
sort_by_frame_size is declared static and only used inside
an ifdef, so use the same ifdef to define the function.  Fixes #572185

Signed-off-by: David Schleef <ds@schleef.org>
2009-02-23 09:20:49 -08:00
Wim Taymans
42c8aa7abc Add YVYU format to caps
Add YVYU format to the caps. We don't have anything to handle these caps yet,
though.
2009-02-23 17:05:43 +01:00
Edward Hervey
309c651286 osxvideosink: Fix build. Fixes #571038 2009-02-10 08:43:59 +01:00
Michael Smith
b9ca852b51 osxvideosink: remove non-embedded mode and fix memory management.
Remove non-embedded mode. Embed mode becomes default and only mode.
embed property is retained for binary compatibility.
Added autorelease pools around all objc functions that might be called
from a non-main thread.
2009-02-05 15:53:04 -08:00
Michael Smith
555c804b7d osxaudio fixes: multichannel and changing caps.
Ensure we create the ringbuffer segment size as a multiple of the
bytes per sample (fixes 6-channel output).
Reset the segoffset when acquiring the ringbuffer, so we don't retain
a bogus offset when caps change.
2009-02-04 16:40:13 -08:00
Brijesh Singh
74f84ae47f Fix comparison of the tuner norms
The V4L2 tuner norms that a device supports could
be a subset of some norm (e.g. NTSC instead of NTSC_M).
The comparison should be done by & instead of ==.

See http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec-single/v4l2.html#STANDARD

Fixes bug #569820.
2009-01-30 14:42:44 +01:00
Stefan Kost
8e462968cf Remove version numbers from a few gst-launch examples.
The majority of the examples doe not use -0.10 and this will also help us to maintain the docs.
2009-01-29 11:07:59 +02:00
Stefan Kost
6335307b97 Update and add documentation for platform specific plugins (sys).
Link to properties. Correct titles for examples. Fix examples.
2009-01-29 10:12:43 +02:00
Tim-Philipp Müller
6c565d2ee1 sys/v4l2/gstv4l2src.c: Fix error code (the message string also needs love, but not today).
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_read):
Fix error code (the message string also needs love, but not today).
2009-01-20 15:33:05 +00:00
Michael Smith
b5f2a609af sys/osxaudio/Makefile.am: Link against CoreServices (needed for osx 10.4) and fix up the linker flags. Fixes #567853.
Original commit message from CVS:
* sys/osxaudio/Makefile.am:
Link against CoreServices (needed for osx 10.4) and fix up the linker
flags. Fixes #567853.
2009-01-15 21:16:45 +00:00
Michael Smith
b7d55c18de sys/osxaudio/Makefile.am: osxaudio plugin now requires AudioUnit framework, so link against that.
Original commit message from CVS:
* sys/osxaudio/Makefile.am:
osxaudio plugin now requires AudioUnit framework, so link against that.
Clean up tabs v spaces while I'm there.
2009-01-13 19:04:09 +00:00
Jan Schmidt
90e9d8e0e1 sys/v4l2/gstv4l2src.c: Remove () from translateable string, so that it makes more sense.
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c:
Remove () from translateable string, so that it makes more sense.
2009-01-07 16:09:47 +00:00
Sascha Hauer
d576b9fdbe sys/v4l2/gstv4l2src.c: Add support for grayscale v4l2 devices. Fixes bug #566616.
Original commit message from CVS:
Patch by: Sascha Hauer <s dot hauer at pengutronix dot de>
Luotao Fu <l dot fu at pengutronix dot de>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure),
(gst_v4l2_get_caps_info):
Add support for grayscale v4l2 devices. Fixes bug #566616.
2009-01-05 12:30:40 +00:00
Justin Karnegas
17bb67f873 sys/osxaudio/: Rewrite osxaudio to work more flexibly and more reliably, using a different abstraction layer of corea...
Original commit message from CVS:
Patch by: Justin Karnegas <justin@affinix.com> and
Michael Smith <msmith@songbirdnest.com>
* sys/osxaudio/gstosxaudio.c:
* sys/osxaudio/gstosxaudioelement.c:
* sys/osxaudio/gstosxaudioelement.h:
* sys/osxaudio/gstosxaudiosink.c:
* sys/osxaudio/gstosxaudiosink.h:
* sys/osxaudio/gstosxaudiosrc.c:
* sys/osxaudio/gstosxaudiosrc.h:
* sys/osxaudio/gstosxringbuffer.c:
* sys/osxaudio/gstosxringbuffer.h:
Rewrite osxaudio to work more flexibly and more reliably, using a
different abstraction layer of coreaudio that is the recommended way of
doing low-level audio I/O on OSX.
Fixes byg #564948.
2009-01-02 20:39:34 +00:00
Brian Cameron
2020290c48 sys/sunaudio/gstsunaudiomixerctrl.c: Set the mixer fd before calling ioctl() on it. Fixes bug #563414.
Original commit message from CVS:
Patch by: Brian Cameron <brian.cameron at sun dot com>
* sys/sunaudio/gstsunaudiomixerctrl.c:
(gst_sunaudiomixer_ctrl_open):
Set the mixer fd before calling ioctl() on it. Fixes bug #563414.
2008-12-07 19:22:48 +00:00
Michael Smith
e6075940b1 sys/osxvideo/osxvideosink.*: Handle video window resizing more correctly, avoiding crashes when embedding the window ...
Original commit message from CVS:
* sys/osxvideo/osxvideosink.h:
* sys/osxvideo/osxvideosink.m:
Handle video window resizing more correctly, avoiding crashes when
embedding the window and resizing it.
2008-11-20 23:59:07 +00:00
Tim-Philipp Müller
2e0d8e8b93 sys/v4l2/v4l2src_calls.c: Turns out we don't always get the frame sizes in a predefined order from lowest to highest ...
Original commit message from CVS:
* sys/v4l2/v4l2src_calls.c:
(gst_v4l2src_probe_caps_for_format_and_size), (sort_by_frame_size),
(gst_v4l2src_probe_caps_for_format):
Turns out we don't always get the frame sizes in a predefined
order from lowest to highest resolution, so let's just sort the
list by frame size once we've queried the possible resolutions
rather than assume any particular order. Fixes probed caps for
the camera in my HP2133 mini notebook and makes v4l2src default
to a decent size.
2008-11-17 14:04:20 +00:00
Stefan Kost
b51bb31b73 sys/v4l2/gstv4l2.c: Give it a primary rank for autovideosrc.
Original commit message from CVS:
* sys/v4l2/gstv4l2.c:
Give it a primary rank for autovideosrc.
2008-11-14 15:42:32 +00:00
Fabricio Godoy
5a4565868d sys/: Fix some spelling mistakes. Fixes #556802.
Original commit message from CVS:
Patch by: Fabricio Godoy <skarllot at gmail dot com>
* sys/oss/gstosssink.c: (gst_oss_sink_open):
* sys/oss/gstosssrc.c: (gst_oss_src_open):
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_mmap):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists):
Fix some spelling mistakes. Fixes #556802.
2008-11-13 17:45:59 +00:00
Bastien Nocera
a50de826a2 Optionally use libv4l to access v4l2 devices. Fixes bug #545033.
Original commit message from CVS:
Patch by: Bastien Nocera <hadess at hadess dot net>,
Hans de Goede <jwrdegoede at fedoraproject dot org>
* configure.ac:
* sys/v4l2/Makefile.am:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_read):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_fill_lists), (gst_v4l2_open), (gst_v4l2_close),
(gst_v4l2_get_norm), (gst_v4l2_set_norm), (gst_v4l2_get_frequency),
(gst_v4l2_set_frequency), (gst_v4l2_signal_strength),
(gst_v4l2_get_attribute), (gst_v4l2_set_attribute),
(gst_v4l2_get_input), (gst_v4l2_set_input):
* sys/v4l2/v4l2_calls.h:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2_buffer_finalize),
(gst_v4l2_buffer_new), (gst_v4l2_buffer_pool_finalize),
(gst_v4l2_buffer_pool_new), (gst_v4l2_buffer_pool_activate),
(gst_v4l2src_fill_format_list),
(gst_v4l2src_probe_caps_for_format_and_size),
(gst_v4l2src_probe_caps_for_format), (gst_v4l2src_grab_frame),
(gst_v4l2src_set_capture), (gst_v4l2src_capture_init),
(gst_v4l2src_capture_start), (gst_v4l2src_capture_stop),
(gst_v4l2src_get_nearest_size):
Optionally use libv4l to access v4l2 devices. Fixes bug #545033.
2008-11-04 12:32:48 +00:00
Stefan Kost
084812bffd Don't install static libs for plugins. Fixes #550851 for -good.
Original commit message from CVS:
* ext/aalib/Makefile.am:
* ext/annodex/Makefile.am:
* ext/cairo/Makefile.am:
* ext/dv/Makefile.am:
* ext/esd/Makefile.am:
* ext/flac/Makefile.am:
* ext/gconf/Makefile.am:
* ext/gdk_pixbuf/Makefile.am:
* ext/hal/Makefile.am:
* ext/jpeg/Makefile.am:
* ext/ladspa/Makefile.am:
* ext/libcaca/Makefile.am:
* ext/libmng/Makefile.am:
* ext/libpng/Makefile.am:
* ext/mikmod/Makefile.am:
* ext/pulse/Makefile.am:
* ext/raw1394/Makefile.am:
* ext/shout2/Makefile.am:
* ext/soup/Makefile.am:
* ext/speex/Makefile.am:
* ext/taglib/Makefile.am:
* ext/wavpack/Makefile.am:
* gst/alpha/Makefile.am:
* gst/apetag/Makefile.am:
* gst/audiofx/Makefile.am:
* gst/auparse/Makefile.am:
* gst/autodetect/Makefile.am:
* gst/avi/Makefile.am:
* gst/cutter/Makefile.am:
* gst/debug/Makefile.am:
* gst/effectv/Makefile.am:
* gst/equalizer/Makefile.am:
* gst/flx/Makefile.am:
* gst/goom/Makefile.am:
* gst/goom2k1/Makefile.am:
* gst/icydemux/Makefile.am:
* gst/id3demux/Makefile.am:
* gst/interleave/Makefile.am:
* gst/law/Makefile.am:
* gst/level/Makefile.am:
* gst/matroska/Makefile.am:
* gst/median/Makefile.am:
* gst/monoscope/Makefile.am:
* gst/multifile/Makefile.am:
* gst/multipart/Makefile.am:
* gst/oldcore/Makefile.am:
* gst/qtdemux/Makefile.am:
* gst/replaygain/Makefile.am:
* gst/rtp/Makefile.am:
* gst/rtsp/Makefile.am:
* gst/smpte/Makefile.am:
* gst/spectrum/Makefile.am:
* gst/udp/Makefile.am:
* gst/videobox/Makefile.am:
* gst/videocrop/Makefile.am:
* gst/videofilter/Makefile.am:
* gst/videomixer/Makefile.am:
* gst/wavenc/Makefile.am:
* gst/wavparse/Makefile.am:
* sys/directdraw/Makefile.am:
* sys/directsound/Makefile.am:
* sys/oss/Makefile.am:
* sys/osxaudio/Makefile.am:
* sys/osxvideo/Makefile.am:
* sys/sunaudio/Makefile.am:
* sys/v4l2/Makefile.am:
* sys/waveform/Makefile.am:
* sys/ximage/Makefile.am:
Don't install static libs for plugins. Fixes #550851 for -good.
2008-11-04 12:28:34 +00:00
Wim Taymans
46fe1e3fa0 sys/v4l2/v4l2src_calls.c: Guard more uncommon formats with ifdefs so that we can compile on older versions.
Original commit message from CVS:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_format_get_rank):
Guard more uncommon formats with ifdefs so that we can compile on older
versions.
2008-10-31 10:08:50 +00:00
Edward Hervey
d0777d87fb sys/ximage/gstximagesrc.c: Fix build for systems that don't have XDamage.
Original commit message from CVS:
* sys/ximage/gstximagesrc.c: (gst_ximage_src_stop):
Fix build for systems that don't have XDamage.
2008-10-08 09:29:00 +00:00
Wim Taymans
419ede208d sys/ximage/gstximagesrc.c: Stop leaking the cursor image.
Original commit message from CVS:
* sys/ximage/gstximagesrc.c: (gst_ximage_src_start),
(gst_ximage_src_stop), (gst_ximage_src_ximage_get):
Stop leaking the cursor image.
Unref the last_ximage and the cached cursor image on shutdown.
Fixes #551570.
2008-10-03 15:54:07 +00:00
Wim Taymans
300da1655b sys/v4l2/gstv4l2object.h: Getting the Class from an instance is not just a matter of casting it to the class struct b...
Original commit message from CVS:
* sys/v4l2/gstv4l2object.h:
Getting the Class from an instance is not just a matter of casting it to
the class struct but it involves calling G_OBJECT_GET_CLASS on the
instance. Fixes #549784.
2008-10-03 11:32:47 +00:00
Michael Smith
e2dbf108e6 configure.ac: Fix libs for linking directsound.
Original commit message from CVS:
* configure.ac:
Fix libs for linking directsound.
* sys/directsound/gstdirectsoundsink.c:
Fix buffer sizing to prevent racing the ringbuffer at startup.
Add volume property.
2008-10-01 21:22:26 +00:00
Edward Hervey
d92f63d3ab sys/osxaudio/: Fix the build on macosx.
Original commit message from CVS:
* sys/osxaudio/gstosxaudiosink.c:
(gst_osx_audio_sink_select_device):
* sys/osxaudio/gstosxaudiosrc.c:
(gst_osx_audio_src_create_ringbuffer),
(gst_osx_audio_src_select_device):
* sys/osxaudio/gstosxringbuffer.c: (gst_osx_ring_buffer_acquire):
Fix the build on macosx.
2008-08-27 16:12:39 +00:00
Michael Smith
295457b001 sys/osxaudio/gstosxaudio.c: Oops. Revert more completely.
Original commit message from CVS:
* sys/osxaudio/gstosxaudio.c:
Oops. Revert more completely.
2008-08-27 00:08:20 +00:00
Michael Smith
2e7ea63d43 sys/osxaudio/gstosxaudio.c: Revert accidental element rename from testing.
Original commit message from CVS:
* sys/osxaudio/gstosxaudio.c:
Revert accidental element rename from testing.
2008-08-26 23:57:05 +00:00
Michael Smith
192c1b942b sys/osxaudio/: Rewrite caps setting and ring buffer initialisation.
Original commit message from CVS:
* sys/osxaudio/Makefile.am:
* sys/osxaudio/gstosxaudio.c:
* sys/osxaudio/gstosxaudiosink.c:
* sys/osxaudio/gstosxaudiosink.h:
* sys/osxaudio/gstosxaudiosrc.c:
* sys/osxaudio/gstosxaudiosrc.h:
* sys/osxaudio/gstosxringbuffer.c:
* sys/osxaudio/gstosxringbuffer.h:
Rewrite caps setting and ring buffer initialisation.
Previously we never told CoreAudio what format we were going to send it,
so it only worked due to luck, and not at all on some hardware.
Now we explicitly advertise what formats the hardware supports, and then
configure the selected one correctly.
2008-08-26 21:13:08 +00:00
Stefan Kost
2ea5c05241 sys/v4l2/: Fix memory leaks. Small code cleanups : No need for empty _init(). No need to memset instance structures. ...
Original commit message from CVS:
* sys/v4l2/gstv4l2object.c:
* sys/v4l2/gstv4l2src.c:
* sys/v4l2/gstv4l2src.h:
* sys/v4l2/v4l2_calls.c:
* sys/v4l2/v4l2src_calls.c:
Fix memory leaks. Small code cleanups : No need for empty _init(). No
need to memset instance structures. Some more FIXME's.
2008-08-26 12:27:11 +00:00
Filippo Argiolas
4cefe7e944 sys/v4l2/gstv4l2tuner.c: v4l2src doesn't have a property named "norm" so don't try to notify about changes to that pr...
Original commit message from CVS:
Patch by: Filippo Argiolas <filippo dot argiolas at gmail dot com>
* sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_set_norm_and_notify):
v4l2src doesn't have a property named "norm" so don't try to notify
about changes to that property. The "norm" property and related
code are commented out currently. Fixes bug #549090.
2008-08-23 15:43:49 +00:00
Mike Ruprecht
e14c307e2d sys/v4l2/gstv4l2object.c: Reprobe devices again instead of taking a cached list as new devices could've been plugged ...
Original commit message from CVS:
Patch by: Mike Ruprecht <cmaiku at gmail dot com>
* sys/v4l2/gstv4l2object.c: (gst_v4l2_class_probe_devices):
Reprobe devices again instead of taking a cached list as new
devices could've been plugged in. Fixes bug #549062.
2008-08-23 15:33:49 +00:00
Ole André Vadla Ravnås
f209c1be01 sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc, gst_directdraw_sink_bufferpool_clear):
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc,
gst_directdraw_sink_bufferpool_clear):
Fix two more buffer ref leaks.
2008-08-21 21:56:19 +00:00
Ole André Vadla Ravnås
7f27287256 sys/directdraw/gstdirectdrawsink.c: Fix buffer ref leak.
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas at tandberg com>
* sys/directdraw/gstdirectdrawsink.c:
(gst_directdraw_sink_show_frame):
Fix buffer ref leak.
2008-08-21 15:28:09 +00:00
Wim Taymans
713e800026 sys/v4l2/gstv4l2src.c: Add S910 and PWC formats with a low priority.
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure),
(gst_v4l2_get_caps_info):
Add S910 and PWC formats with a low priority.
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_format_get_rank),
(gst_v4l2src_probe_caps_for_format):
Add more debugging.
2008-08-21 12:12:00 +00:00
Edward Hervey
5cf61c6a80 sys/v4l2/gstv4l2src.c: Properly set the maximum latency value, in the same way it is done in v4lsrc.
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_query):
Properly set the maximum latency value, in the same way it is done in
v4lsrc.
* sys/v4l2/v4l2src_calls.c:
Simplify fraction equality check, no need to use GValues for this.
2008-08-13 08:33:57 +00:00
Edward Hervey
27e20eadc0 sys/v4l2/gstv4l2src.c: Add warning messages stating exactly why the latency query failed.
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_query):
Add warning messages stating exactly why the latency query failed.
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture):
In some cases, the negotiated framerate might be the default one which
is already set internally. But we still need to mark it down in fps_n
and fps_d so that the latency query can happen properly.
2008-08-12 12:04:24 +00:00
Frederic Crozat
426721f717 Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#546822).
Original commit message from CVS:
Patch by: Frederic Crozat <fcrozat@mandriva.org>
* ext/esd/gstesd.c: (plugin_init):
* ext/flac/gstflac.c: (plugin_init):
* ext/shout2/gstshout2.c: (plugin_init):
* ext/wavpack/gstwavpack.c: (plugin_init):
* sys/oss/gstossaudio.c: (plugin_init):
* sys/v4l2/gstv4l2.c: (plugin_init):
Make sure gettext returns translations in UTF-8 encoding rather
than in the current locale encoding (#546822).
2008-08-07 16:11:00 +00:00
Jan Schmidt
ab01993d33 sys/v4l2/v4l2src_calls.c: When outputting a pad template range for the size, include a framerate range too, to avoid ...
Original commit message from CVS:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format):
When outputting a pad template range for the size, include a framerate
range too, to avoid 'not a real subset of template caps' errors.
2008-08-07 10:22:32 +00:00
Edward Hervey
4511fdb05d sys/osxvideo/osxvideosink.m: Fix minor build issues on macosx.
Original commit message from CVS:
* sys/osxvideo/osxvideosink.m:
Fix minor build issues on macosx.
Fixes #543054
2008-07-17 16:42:53 +00:00
Benoit Fouet
f2fb132b9c sys/v4l2/gstv4l2src.c: Avoid compiler warning by initialising variable to NULL (#543259).
Original commit message from CVS:
Patch by: Benoit Fouet <benoit.fouet purplelabs com>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_negotiate):
Avoid compiler warning by initialising variable to NULL (#543259).
2008-07-17 13:54:38 +00:00
Sebastian Dröge
92ed8f6a74 Don't use declarations after statements and variable length arrays.
Original commit message from CVS:
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_uri_set_uri):
* ext/speex/gstspeexenc.c: (gst_speex_enc_sink_getcaps):
* ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_set_wp_config):
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_fixate):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format):
* tests/examples/equalizer/demo.c: (message_handler):
* tests/examples/spectrum/demo-audiotest.c: (message_handler):
* tests/examples/spectrum/demo-osssrc.c: (message_handler):
Don't use declarations after statements and variable length arrays.
2008-07-08 12:51:34 +00:00
Daniel Drake
23078b431b sys/v4l2/v4l2src_calls.c: Try progressive video if interlaced fails. Fixes bug #541956 and the usage of v4l2src on OLPC.
Original commit message from CVS:
Patch by: Daniel Drake <dsd at gentoo dot org>
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture),
(gst_v4l2src_get_nearest_size):
Try progressive video if interlaced fails. Fixes bug #541956
and the usage of v4l2src on OLPC.
2008-07-07 21:28:58 +00:00
Tim-Philipp Müller
45aa7f8f16 sys/v4l2/v4l2_calls.c: Don't include unused gstv4l2xoverlay.h. Fixes build in case where X11 headers are not installed.
Original commit message from CVS:
* sys/v4l2/v4l2_calls.c::
Don't include unused gstv4l2xoverlay.h. Fixes build
in case where X11 headers are not installed.
2008-06-26 16:36:47 +00:00
Brian Cameron
fe573a687f sys/sunaudio/gstsunaudiomixerctrl.c: Improvements for the SunAudio mixer by handling mute as no gain for tracks that ...
Original commit message from CVS:
Patch by: Brian Cameron <brian.cameron at sun dot com>
* sys/sunaudio/gstsunaudiomixerctrl.c:
(gst_sunaudiomixer_ctrl_get_volume),
(gst_sunaudiomixer_ctrl_set_volume):
Improvements for the SunAudio mixer by handling mute as no gain
for tracks that have a gain property but no mute property.
Fixes bug #536067.
2008-06-10 06:52:44 +00:00
Sjoerd Simons
0f2d27525b sys/v4l2/gstv4l2src.c: Improve negotiation a bit more by picking the smallest possible resolution that is larger than...
Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_negotiate):
Improve negotiation a bit more by picking the smallest possible
resolution that is larger than the resolution specified in the
first caps entry of the peer caps. Fixes bug #536994.
2008-06-09 08:52:04 +00:00
Bastien Nocera
d4e7ab0e8c sys/v4l2/: Fix compilation with newer GIT kernels that deprecated
Original commit message from CVS:
Patch by: Bastien Nocera <hadess at hadess dot net>
* sys/v4l2/gstv4l2vidorient.c:
* sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists):
Fix compilation with newer GIT kernels that deprecated
V4L2_CID_HCENTER and V4L2_CID_VCENTER. Fixes bug #536317.
2008-06-09 08:42:49 +00:00
Sjoerd Simons
22940c0010 sys/v4l2/gstv4l2src.c: Provide a custom negotiation function to make sure to pick the highest possible framerate and ...
Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init),
(gst_v4l2src_fixate), (gst_v4l2src_negotiate):
Provide a custom negotiation function to make sure to pick the highest
possible framerate and resolution. Fixes bug #536646.
2008-06-04 17:39:31 +00:00
William M. Brack
61597d99e9 sys/v4l2/v4l2src_calls.c: Fix potential caps leak.
Original commit message from CVS:
Patch by: William M. Brack <wbrack at mmm dot com dot hk>
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format):
Fix potential caps leak.
If we can't get the framerate with an ioctl, try to get it with the
current norm. Fixes #520092.
2008-05-26 15:39:26 +00:00
William M. Brack
dfe8d582fc sys/v4l2/v4l2src_calls.c: If we fail to get the frame intervals, simply don't touch the framerates on the template ca...
Original commit message from CVS:
Patch by: William M. Brack <wbrack at mmm dot com dot hk>
* sys/v4l2/v4l2src_calls.c:
(gst_v4l2src_probe_caps_for_format_and_size):
If we fail to get the frame intervals, simply don't touch the framerates
on the template caps instead of discarding the format. See #520092.
2008-05-26 15:14:55 +00:00
William M. Brack
c3bde2dc42 sys/v4l2/gstv4l2src.c: Add NV12, NV21 and bayer support. See #520092.
Original commit message from CVS:
Patch by: William M. Brack <wbrack at mmm dot com dot hk>
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure),
(gst_v4l2_get_caps_info):
Add NV12, NV21 and bayer support. See #520092.
2008-05-26 14:52:51 +00:00
Sebastian Dröge
5a344798f0 sys/v4l2/gstv4l2src.c: Don't include the gstv4l2xoverlay.h header as the XOverlay support isn't implemented at all ye...
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c:
Don't include the gstv4l2xoverlay.h header as the XOverlay support
isn't implemented at all yet and this requires X headers to be
installed. Fixes bug #533264.
2008-05-17 10:38:18 +00:00
Haakon Sporsheim
acb8ba648d sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_setup_ddraw): Do IDirectDrawClipper_SetHWnd() if the window I...
Original commit message from CVS:
patch by: Haakon Sporsheim <haakon.sporsheim at tandberg com>
* sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_setup_ddraw):
Do IDirectDrawClipper_SetHWnd() if the window ID has already been
set after creating the clipper.
2008-05-07 15:33:52 +00:00
Haakon Sporsheim
368834ab4e sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame): Added checking of surface lost case after an uns...
Original commit message from CVS:
patch by: Haakon Sporsheim <haakon.sporsheim at tandberg com>
* sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame):
Added checking of surface lost case after an unsuccessful
IDirectDrawSurface7_Lock() call.
If surface is lost, return GST_FLOW_OK.
2008-05-07 15:28:06 +00:00
Haakon Sporsheim
dd1f932e3e sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame,
Original commit message from CVS:
patch by: Haakon Sporsheim <haakon.sporsheim at tandberg com>
* sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame,
WndProc, gst_directdraw_sink_window_thread):
Improved Windows message loop and fixed window destruction issue.
When the window which DirectDraw is rendering to is destroyed, the
render/show_frame function will return GST_FLOW_ERROR.
Partially fixes #520885.
2008-05-07 15:19:47 +00:00
Haakon Sporsheim
da78d8dced sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps): Fixed mid stream resolution change bug, the offscr...
Original commit message from CVS:
patch by: Haakon Sporsheim <haakon.sporsheim at tandberg com>
* sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps):
Fixed mid stream resolution change bug, the offscreen surface is now
released when set_caps is called.
Partially fixes #520885.
2008-05-07 15:09:10 +00:00
Ole André Vadla Ravnås
deab3d26ba sys/directdraw/gstdirectdrawsink.c
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c
(gst_directdraw_sink_buffer_alloc):
Make it so that gst_directdraw_sink_buffer_alloc uses the right
width/height.
Especially when looking through the pool of buffers, make sure that
the width/height of caps is used instead of the already negotiated
dimensions.
For example if a buffer with different caps is requested, i.e.
higher resolution, the caller would get a buffer with the old
dimensions and thus corrupt the heap.
2008-05-07 14:56:22 +00:00
Ole André Vadla Ravnås
c02e043b1f sys/directdraw/gstdirectdrawsink.c
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c
(gst_directdraw_sink_buffer_alloc):
Clear the flags on recycled buffers from buffer_alloc.
Partially fixes #520885.
The right fix this time.
2008-05-07 14:43:39 +00:00
Ole André Vadla Ravnås
b0638c5f79 sys/directdraw/gstdirectdrawsink.c
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c
(gst_directdraw_sink_buffer_alloc):
Reverting previous commit, it had it all mixed up, was for a different
patch (major automation screw-up). Sorry!
2008-05-07 14:39:45 +00:00
Ole André Vadla Ravnås
04adbf5be3 sys/directdraw/gstdirectdrawsink.c
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c
(gst_directdraw_sink_buffer_alloc):
Clear the flags on recycled buffers from buffer_alloc.
Partially fixes #520885.
2008-05-07 13:48:28 +00:00
Thijs Vermeir
1973c62992 sys/osxvideo/cocoawindow.m: Fix compiler warnings on PPC64. Fixes bug #499318.
Original commit message from CVS:
Patch by: Thijs Vermeir <thijsvermeir at gmail dot com>
* sys/osxvideo/cocoawindow.m:
Fix compiler warnings on PPC64. Fixes bug #499318.
2008-05-06 09:33:46 +00:00
Tim-Philipp Müller
0525a5d213 sys/oss/: More logging when probing (see #518474), some comments in _reset().
Original commit message from CVS:
* sys/oss/gstosshelper.c: (gst_oss_helper_rate_check_rate):
* sys/oss/gstosssink.c: (gst_oss_sink_reset):
* sys/oss/gstosssrc.c: (gst_oss_src_reset):
More logging when probing (see #518474), some comments in _reset().
2008-04-08 19:49:34 +00:00
Brian Cameron
23b9485530 sys/sunaudio/: Fix up copyrights (#525860).
Original commit message from CVS:
Patch by: Brian Cameron <brian.cameron at sun dot com>
* sys/sunaudio/gstsunaudio.c:
* sys/sunaudio/gstsunaudiomixer.c:
* sys/sunaudio/gstsunaudiomixer.h:
* sys/sunaudio/gstsunaudiomixerctrl.c:
* sys/sunaudio/gstsunaudiomixerctrl.h:
* sys/sunaudio/gstsunaudiomixertrack.c:
* sys/sunaudio/gstsunaudiomixertrack.h:
* sys/sunaudio/gstsunaudiosink.c:
* sys/sunaudio/gstsunaudiosink.h:
* sys/sunaudio/gstsunaudiosrc.c:
* sys/sunaudio/gstsunaudiosrc.h:
Fix up copyrights (#525860).
2008-04-02 22:37:29 +00:00
Brian Cameron
01c237e91d sys/sunaudio/: Fix up the mixer tracks to use a volume range of 0-255, which is what the sun audio API uses. This sim...
Original commit message from CVS:
Patch by: Brian Cameron <brian.cameron at sun dot com>
* sys/sunaudio/gstsunaudiomixerctrl.c:
(gst_sunaudiomixer_ctrl_get_volume),
(gst_sunaudiomixer_ctrl_set_volume):
* sys/sunaudio/gstsunaudiomixertrack.c: (gst_sunaudiomixer_track_new):
Fix up the mixer tracks to use a volume range of 0-255, which is what
the sun audio API uses. This simplifies the code and avoids rounding
errors. Fixes #524593.
2008-03-27 09:36:58 +00:00
Edgard Lima
70ee2ee5e0 Add device-fd property to make it possible to apps to call ioctl's.
Original commit message from CVS:
Add device-fd property to make it possible to apps to call ioctl's.
2008-03-26 15:10:08 +00:00
Tim-Philipp Müller
d31a648d75 sys/v4l2/v4l2src_calls.c: Remove superfluous DEBUG macro.
Original commit message from CVS:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture):
Remove superfluous DEBUG macro.
2008-03-25 12:39:22 +00:00
William M. Brack
e605a94e40 sys/v4l2/v4l2src_calls.c: Check whether the device supports setting the framerate before trying to set it and then po...
Original commit message from CVS:
Based on patch by: William M. Brack <wbrack at mmm com hk>
* sys/v4l2/v4l2src_calls.c: (fractions_are_equal),
(gst_v4l2src_set_capture):
Check whether the device supports setting the framerate before
trying to set it and then posting a warning or error if it doesn't
work (#516649, #520092). Also compare fractions more correctly.
2008-03-25 12:33:09 +00:00
Andy Wingo
f7edc0c690 sys/osxvideo/osxvideosink.m (gst_osx_video_sink_osxwindow_destroy)
Original commit message from CVS:
2008-03-18  Andy Wingo  <wingo@pobox.com>

* sys/osxvideo/osxvideosink.m
(gst_osx_video_sink_osxwindow_destroy)
(gst_osx_video_sink_osxwindow_new): Actually set a lock on the
task, whoopdee.
(cocoa_event_loop): Pacify the taymans by upping the usleepage to
2 ms.
2008-03-18 15:03:06 +00:00
Andy Wingo
a6267f383e sys/osxvideo/osxvideosink.m (gst_osx_video_sink_osxwindow_destroy)
Original commit message from CVS:
2008-03-18  Andy Wingo  <wingo@pobox.com>

* sys/osxvideo/osxvideosink.m (gst_osx_video_sink_osxwindow_destroy)
(gst_osx_video_sink_osxwindow_new, cocoa_event_loop):
* sys/osxvideo/osxvideosink.h (struct _GstOSXVideoSink): If we
need to run an event loop, do so in a task instead of assuming
that there will be a GMainLoop. Fixes #523134.
2008-03-18 11:50:08 +00:00
William M. Brack
a6019fc0bf sys/v4l2/v4l2src_calls.c: Make sure the probed frame sizes are reversed in the resulting caps also when using V4L2_FR...
Original commit message from CVS:
Patch by: William M. Brack <wbrack at mmm com hk>
* sys/v4l2/v4l2src_calls.c:
(gst_v4l2src_probe_caps_for_format_and_size),
(gst_v4l2src_probe_caps_for_format):
Make sure the probed frame sizes are reversed in the resulting
caps also when using V4L2_FRMSIZE_STEPWISE (so they end up
highest resolution first); also remove unused variable.
(Partly fixes #520092)
2008-03-17 19:50:58 +00:00
Mark Nauwelaerts
fd1c1295dc sys/oss/gstosssrc.*: Cache probed caps, so _get_caps() during recording doesn't cause ioctl calls which may disrupt t...
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw skynet be>
* sys/oss/gstosssrc.c: (gst_oss_src_init), (gst_oss_src_getcaps),
(gst_oss_src_close):
* sys/oss/gstosssrc.h:
Cache probed caps, so _get_caps() during recording doesn't cause
ioctl calls which may disrupt the recording (fixes #521875).
2008-03-11 23:12:04 +00:00
Jan Schmidt
361c3c94c3 sys/ximage/gstximagesrc.c: Initialise variables when opening the X display rather than in _start(), as the display ca...
Original commit message from CVS:
* sys/ximage/gstximagesrc.c:
Initialise variables when opening the X display rather
than in _start(), as the display can be opened before that.
Fixes: #515985
2008-02-12 13:34:52 +00:00
Sebastian Dröge
d62d8d9fea sys/directdraw/gstdirectdrawsink.c: Properly chain up finalize functions. Fixes bug #515980.
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c:
(gst_ddrawsurface_class_init), (gst_ddrawsurface_finalize),
(gst_directdraw_sink_finalize):
Properly chain up finalize functions. Fixes bug #515980.
2008-02-12 12:22:48 +00:00
Sebastian Dröge
45aeb687d2 sys/v4l2/v4l2src_calls.c: Chain up the finalize functions. Fixes bug #515984.
Original commit message from CVS:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2_buffer_finalize),
(gst_v4l2_buffer_class_init), (gst_v4l2_buffer_pool_finalize),
(gst_v4l2_buffer_pool_class_init):
Chain up the finalize functions. Fixes bug #515984.
2008-02-12 11:38:54 +00:00
Sebastian Dröge
bb3b6569ea sys/ximage/ximageutil.c: Chain up in the finalize function for our custom buffer sub-class.
Original commit message from CVS:
* sys/ximage/ximageutil.c:
Chain up in the finalize function for our custom
buffer sub-class.
Patch by: Sebastian Dröge  <slomo@circular-chaos.org>
Fixes: #515706
2008-02-12 11:14:36 +00:00
Jan Schmidt
ababb87313 sys/ximage/gstximagesrc.c: Free allocated Damage memory before closing our connection to the
Original commit message from CVS:
* sys/ximage/gstximagesrc.c:
Free allocated Damage memory before closing our connection to the
X server. Fixes: #515706
2008-02-12 11:09:08 +00:00
Jan Schmidt
38baf136e6 sys/v4l2/v4l2_calls.c: Treat ENOTTY (driver does not implement ioctl) the same as
Original commit message from CVS:
* sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists):
Treat ENOTTY (driver does not implement ioctl) the same as
EINVAL since it implies there are no available standards.
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format),
(gst_v4l2src_get_nearest_size):
Replace gst_v4l2src_get_size_limits with 2 calls to new function
gst_v4l2src_get_nearest_size, and get it to use VIDIOC_S_FMT to
probe if the driver does not support VIDIOC_TRY_FMT for whatever
reason, and if we aren't yet actively capturing.
* sys/v4l2/v4l2src_calls.h:
Remove replaced function declaration.
2008-01-31 16:12:28 +00:00
Brian Cameron
a973a4f154 configure.ac: Detect video4linux headers on Solaris too.
Original commit message from CVS:
* configure.ac:
Detect video4linux headers on Solaris too.
* sys/v4l2/gstv4l2colorbalance.h:
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/v4l2_calls.c:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2_buffer_finalize),
(gst_v4l2_buffer_new):
Make v4l2 build on Solaris.
Patch by: Brian Cameron  <brian.cameron at sun dot com>
Fixes: #510505
2008-01-21 19:35:58 +00:00
Stefan Kost
567ec26deb Revert previous change caused by a file that got stuck on an old revision.
Original commit message from CVS:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* sys/osxvideo/osxvideosink.h:
Revert previous change caused by a file that got stuck on an old
revision.
2008-01-15 16:04:44 +00:00
Stefan Kost
04c899f757 Managed to resolve most unused declarations. Filed a bug for one left.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* sys/osxaudio/gstosxaudiosink.h:
* sys/osxvideo/osxvideosink.h:
Managed to resolve most unused declarations. Filed a bug for one left.
2008-01-15 15:22:41 +00:00