Commit graph

55 commits

Author SHA1 Message Date
Ilya Konstantinov
528871f571 avfvideosrc: drop frames we get before we have a clock
https://bugzilla.gnome.org/show_bug.cgi?id=748054
2015-04-26 20:37:11 +02:00
Alessandro Decina
edf9035d02 applemedia: avoid implicit color conversions
Rework the GL texture code a little to avoid implicit color conversion inside
AVF/VT on both iOS and OSX.
2015-04-20 17:09:58 +10:00
Ilya Konstantinov
472d1959a2 avfvideosrc: check for failure to create buffer
gst_core_media_buffer_new and gst_core_video_texture_cache_get_gl_buffer
can fail for various platform reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=748122
2015-04-19 14:48:11 +02:00
Yujin Lee
4a88951c52 avfvideosrc: fix build failure with clang
Use fabs for floating point input.

https://bugzilla.gnome.org/show_bug.cgi?id=748128
2015-04-19 12:54:32 +01:00
Ilya Konstantinov
a02a948a5d avfvideosrc: get connection and input clock early 2015-04-18 00:33:42 +10:00
Ilya Konstantinov
d1120c591c avfvideosrc: remove unused variables
Complement commit 5496fd3e75 by removing
the involved variables.
2015-04-15 10:16:17 +10:00
Alessandro Decina
3e0391a1f1 avfvideosrc: log timestamps 2015-04-14 18:05:58 +10:00
Ilya Konstantinov
5bc17dac29 avfvideosrc: subtract time spent in AVF queues
The time spent in AVF queues was being incorrectly added to running time
rather than subtracted.
2015-04-14 18:05:58 +10:00
Ilya Konstantinov
1b27538648 avfvideosrc: fix GL texture negotiation
GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE should no longer be used.
Instead, just get the GL context.

https://bugzilla.gnome.org/show_bug.cgi?id=747352
2015-04-14 18:05:57 +10:00
Ilya Konstantinov
4fd0f7277a avfvideosrc: fix setting of buffer offset end
Don't set offset end to random values off the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=747352
2015-04-07 12:57:44 +01:00
ijsf
f62dda74cc Restricted activeVideoMaxFrameDuration to fix frame rate 2015-03-13 14:43:14 +00:00
Florian Zwoch
a8ae57480c avfvideosrc: allow "capture-screen" mode to select which screen to capture via the "device-index" option
https://bugzilla.gnome.org/show_bug.cgi?id=745161
2015-03-06 10:37:37 +01:00
Sebastian Dröge
84ab11afdb avfvideosrc: Only set latency if we already know our caps
Otherwise we might set bogus values or GST_CLOCK_TIME_NONE.

Also make sure to reset the caps field to NULL after unreffing
the caps to prevent accidential use afterwards, and unref any
old caps before we remember new caps.
2015-02-19 01:03:35 +02:00
Alessandro Decina
6e325be516 applemedia: avfvideosrc: fix crash when non-GL memory is used 2015-02-13 19:12:54 +11:00
Sebastian Dröge
31f59cb344 avfvideosrc: Only use the duration of the sample if it is valid 2015-02-12 11:12:09 +02:00
Alessandro Decina
f577b52e5d applemedia: rework GL texture sharing
Use YUV instead of RGB textures, then convert using the new apple specific
shader in GstGLColorConvert. Also use GLMemory directly instead of using the
GL upload meta, avoiding an extra texture copy we used to have before.
2015-01-30 00:34:08 +11:00
Alessandro Decina
8734abb1ce applemedia: don't call CVPixelBufferLockBaseAddress when doing texture sharing
When doing texture sharing we don't need to call CVPixelBufferLockBaseAddress to
map the buffer in CPU. This cuts about 10% relative cpu time from a vtdec !
glimagesink pipeline.
2015-01-30 00:34:08 +11:00
Alessandro Decina
cdfe90aaba avfvideosrc: implement the GL texture upload meta 2015-01-15 14:10:43 +11:00
Alessandro Decina
5496fd3e75 avfvideosrc: improve timestamp code
Use a combination of the running time and CMClockGetTime from AVF to compute
timestamps.
2014-12-27 12:43:45 +11:00
Alessandro Decina
0156725480 avfvideosrc: improve timestamping and latency reporting
Use AVF provided timings to timestamp output buffers. Use the running time at
the time the first buffer is produced to base timestamps on. Report 1-frame
latency based on the negotiated framerate instead of hardcoding 4ms latency.
2014-12-17 12:24:05 +11:00
Sebastian Dröge
98b856d630 avfvideosrc: Don't pretend to support reconfiguration
We will run into an assertion in set_caps() if we try to change
caps while the source is already running. Don't try to find new
caps in GstBaseSrc::negotiate() to prevent caps changes.
2014-11-09 10:41:52 +01:00
Tim-Philipp Müller
ffe59820d8 avfvideosrc: fix bogus BGRA caps
Remove 0.10-style endianness/*_mask/bpp/depth fields.
2014-09-10 16:38:52 +01:00
Matthieu Bouron
e728ee8208 coremediabuffer: handle stride alignment
Handle stride alignment through the use of the video meta API. The
code is based on the corevideobuffer implementation.

If the video meta API is not supported and the underlying buffer
contains padding, the core media buffer is copied to a system memory
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=727885
2014-04-24 12:27:59 +02:00
Matthieu Bouron
c6572df9ff avfvideosrc: check if downstream supports the video meta API
Check if downstream supports the video meta API, so we can use it later
with the core media buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=727953
2014-04-24 10:46:51 +01:00
Matthieu Bouron
58be5ce16d avfvideosrc: declare missing instance variables
Fixes build on 32-bit system.

https://bugzilla.gnome.org/show_bug.cgi?id=711844
2013-11-11 14:36:19 +01:00
Andoni Morales Alastruey
98e849a092 avfvideosrc: fix build in iOS with isEqualTo doesn't exists 2013-11-07 15:24:28 +01:00
Andoni Morales Alastruey
a2b90eeb8c avfvideosrc: fix build with older SDK not supporting AVDeviceFormat
AVDeviceFormat and AVFrameRateRange are available in iOS since 7.0
so we need a more dynamic approach to support compilation with older
SDK's. We use a NSObject to avoid referencing those types and key-value
coding or preformSelector to access properties.
2013-11-07 15:24:28 +01:00
Andoni Morales Alastruey
46a61ea036 avfvideosrc: fix checks for HAVE_IOS 2013-11-07 15:24:28 +01:00
Andoni Morales Alastruey
81cb13be64 avfvideosrc: include config.h 2013-11-07 15:24:28 +01:00
Andoni Morales Alastruey
ef7f6e4654 avfvideosrc: add more debug 2013-11-07 15:24:28 +01:00
Andoni Morales Alastruey
606a50e550 avfvideosrc: fix compilation with gcc
The synthesize block needs to be moved to fix a compiler error
2013-11-07 15:24:28 +01:00
Andoni Morales Alastruey
94d77829a4 avfvideosrc: sort caps with the highest resolution first
When started without any caps filter we prefer the highest
supported resolution.
2013-11-07 15:24:28 +01:00
Matthieu Bouron
66334591cc avfvideosrc: support screen capture on OSX
https://bugzilla.gnome.org/show_bug.cgi?id=711432
2013-11-07 15:24:28 +01:00
Matthieu Bouron
88b5ff76f6 avfvideosrc: minor cosmetic 2013-11-07 15:24:28 +01:00
Matthieu Bouron
752d74b31f avfvideosrc: use input device formats to set/get caps if available
https://bugzilla.gnome.org/show_bug.cgi?id=711211
2013-11-07 15:24:28 +01:00
Matthieu Bouron
35587efdc9 avfvideosrc: update caps if frame size has changed
On OSX, setting the pixel format on the output reset the capture device
to its native resolution, so we need to update the caps if the output
frame size has changed before a proper solution is found.
2013-11-07 15:24:28 +01:00
Matthieu Bouron
fae79751ad avfvideosrc: check if low preset is available 2013-11-07 15:24:28 +01:00
Matthieu Bouron
7f807270fa avfvideosrc: use a dedicated queue for AVFoundation calls
Replace the main queue with a dedicated queue for AVFoundation calls
so the execution on this queue won't block if the main queue
is not running.
2013-11-07 15:24:28 +01:00
Matthieu Bouron
5d612768a4 avfvideosrc: remove trailing space 2013-11-07 15:24:28 +01:00
Matthieu Bouron
19844fab47 avfvideosrc: dispatch AVFoundation calls synchronously in the main queue 2013-11-07 15:24:27 +01:00
Matthieu Bouron
b6925d5c56 avfvideosrc: only enable 1920x1080 preset on iOS 2013-11-07 15:24:27 +01:00
Matthieu Bouron
06d59e7829 applemedia: port avfvideosrc to 1.0 2013-11-07 15:24:27 +01:00
Matthieu Bouron
22eaf39c1a avfvideosrc: fix truncated line
https://bugzilla.gnome.org/show_bug.cgi?id=710657
2013-10-30 16:27:58 +00:00
Andoni Morales Alastruey
9b168e6b4d applemedia: remove the unneeded buffer factory 2013-05-20 13:31:02 +02:00
Andoni Morales Alastruey
27c546ad1e avfvideosrc: fix deadlock draining queue from the same thread 2013-04-15 09:02:37 +02:00
Ole André Vadla Ravnås
519cefdeee applemedia: update contact information 2013-02-16 02:51:52 +01:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Olivier Crête
9a328a8f71 avfvideosrc: Negotiate format, also support more resolutions
This should enable supprt for old and new iPhones with the same code.
2012-10-30 19:32:59 +01:00
Mark Nauwelaerts
578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Wim Taymans
de1f89bf07 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:37:13 +01:00