Commit graph

2629 commits

Author SHA1 Message Date
Vineeth TM
66bac3eb86 d3dvideosink: post message to application for unhandled keyboard/mouse events
https://bugzilla.gnome.org/show_bug.cgi?id=763403
2016-03-24 14:58:24 +02:00
Justin Kim
b9ecc42b76 ahcsrc: remove probe_properties
It's a residue of 0.10.

https://bugzilla.gnome.org/show_bug.cgi?id=763100
2016-03-24 14:57:39 +02:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Martin Kelly
c257829213 ahc: eliminate AHC*_CALL macros
Currently, we use AHC*_CALL macros to call many of the Camera functions.
However, we already have helper classes to call the Camera functions, so
eliminate the macros.

As a nice side-benefit, we also get improved error handling and
reporting when something goes wrong calling these functions, because a
GError gets populated, and we log a GST_ERROR when something fails. This
was harder to do using macros, as all error handling was hidden from the
caller.

https://bugzilla.gnome.org/show_bug.cgi?id=763065
2016-03-24 14:55:14 +02:00
Martin Kelly
a2f270b316 ahc: use gst unref functions
https://bugzilla.gnome.org/show_bug.cgi?id=763065
2016-03-24 14:55:14 +02:00
Martin Kelly
1bfd6526d4 ahc: use gst new object functions
https://bugzilla.gnome.org/show_bug.cgi?id=763065
2016-03-24 14:55:14 +02:00
Sebastian Dröge
0acdcc1b37 openslesringbuffer: Warn if the position reported by OpenSL is higher than what we queued up so far
This would hint at wrong position reporting, and apparently sometimes happens
after a seek.
2016-03-16 12:03:53 +02:00
Sebastian Dröge
610705cbb4 amc: Correctly handle NULL input buffers
https://bugzilla.gnome.org/show_bug.cgi?id=763401
2016-03-11 10:46:10 +02:00
Sebastian Dröge
9132b72c32 amcvideodec: getOutputBuffers() returns a NULL array when a surface was configured
So don't error out if it does.

https://bugzilla.gnome.org/show_bug.cgi?id=763401
2016-03-11 10:46:10 +02:00
Justin Kim
10c6d1b558 androidmedia: Remove unused file
ahcsrc is registered by gstamc.c

https://bugzilla.gnome.org/show_bug.cgi?id=763098
2016-03-05 10:04:39 +02:00
Martin Kelly
a7d6c07b86 amc: properly deinit when ahcsrc register fails
In the androidmedia plugin_init, we initialize various resources on the
Android device. If anything fails during this series of initializations,
we need to deinitialize any initializations that already occurred.
However, we don't do so if we fail to register the ahcsrc element. Fix
this.

https://bugzilla.gnome.org/show_bug.cgi?id=763065
2016-03-04 09:42:14 +02:00
Martin Kelly
ddebf1ff66 ahc: correct error message
The error message is specific to only one of the failure cases and is
misleading in the others. Correct it to be more generic and cover all
the failure cases.

https://bugzilla.gnome.org/show_bug.cgi?id=763065
2016-03-04 09:42:14 +02:00
Martin Kelly
e337918a06 ahc: remove unneeded #include <stdio.h>
https://bugzilla.gnome.org/show_bug.cgi?id=763065
2016-03-04 09:42:14 +02:00
Martin Kelly
21d1eaa6c8 ahc: typo fix
https://bugzilla.gnome.org/show_bug.cgi?id=763065
2016-03-04 09:42:14 +02:00
Sebastian Dröge
476d5b6940 amcvideodec: When outputting on a surface, accept all color formats
We don't have to understand them, we handle them as a GL texture.

https://bugzilla.gnome.org/show_bug.cgi?id=762792
2016-02-28 11:10:39 +02:00
Sebastian Dröge
924795c85c vtdec: Negotiate the decoder in set_format() already
Don't wait until later, we want to know here if the codec can be opened or not
for the requested format. This was removed (accidentially?) by
  119e09eac3

Without this decodebin has no way to switch to a different decoder if this one
does not work.

https://bugzilla.gnome.org/show_bug.cgi?id=762613
2016-02-25 11:38:07 +02:00
Joe Gorse
2b63a88f26 avfvideosrc: Frame durations as CTime to the API, not double
Newer iOS seems to automatically convert, older iOS/OSX just crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=762575
2016-02-25 11:34:40 +02:00
Matthew Waters
b48049a171 nvenc: release the frames and list when searching for an output buffer
Fixes a massive leak in:

videotestsrc ! nvh264enc ! fakesink
2016-02-25 00:07:14 +11:00
Peter Seiderer
df4ef4be39 fbdevsink: fix bytes per pixel calculation
Simple pipeline

	$ gst-launch-1.0 videotestsrc ! fbdevsink

crashes with SIGSEGV in case the frambuffer xres is smaller
than the virtual xres resolution, e.g.:

	$ fbset

  mode "800x480-0"
          # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
          geometry 800 480 1920 1200 16
          timings 0 0 0 0 0 0 0
          accel true
          rgba 5/11,6/5,5/0,0/0
  endmode

Debug:
	$ gdb gst-launch-1.0
  (gdb) run videotestsrc ! fbdevsink
  (gdb) where
  #0  0xb6bd2d24 in __memcpy_neon ()
      at ../sysdeps/arm/armv7/multiarch/memcpy_impl.S:591
  #1  0xb69b04e8 in gst_fbdevsink_show_frame (videosink=0x10a3378,
      buf=0xb5c08838) at gstfbdevsink.c:269
  #2  0xb69e88c4 in gst_base_sink_do_preroll (sink=sink@entry=0x10a3378,
      obj=0xb5c08838, obj@entry=0xa0) at gstbasesink.c:2281
  #3  0xb69e92bc in gst_base_sink_do_sync (basesink=basesink@entry=0x10a3378,
      obj=0xa0, obj@entry=0xb5c08838, late=0x0, late@entry=0xb6548ba0,
      step_end=0x140, step_end@entry=0xb6548ba4) at gstbasesink.c:2500
  #4  0xb69ea67c in gst_base_sink_chain_unlocked (
      basesink=basesink@entry=0x10a3378, obj=0x0, obj@entry=0xb5c08838,
      is_list=is_list@entry=0, pad=<optimized out>) at gstbasesink.c:3486
  #5  0xb69ec1c0 in gst_base_sink_chain_main (basesink=0x10a3378,
      pad=<optimized out>, obj=0xb5c08838, is_list=0) at gstbasesink.c:3647
  #6  0xb6eb5b10 in gst_pad_chain_data_unchecked (pad=0x10a6170,
      type=<optimized out>, data=0xb5c08838) at gstpad.c:4086
  #7  0xb6eb7a34 in gst_pad_push_data (pad=pad@entry=0x10a6020,
      type=type@entry=4112, data=0xb5c08838) at gstpad.c:4338
  #8  0xb6ebf344 in gst_pad_push (pad=pad@entry=0x10a6020,
      buffer=<optimized out>) at gstpad.c:4454
  #9  0xb69f22f0 in gst_base_src_loop (pad=0x10a6020) at gstbasesrc.c:2845
  #10 0xb6eeddfc in gst_task_func (task=0x10a8828) at gsttask.c:331
  #11 0xb6d485a0 in g_thread_pool_thread_proxy (data=<optimized out>)
   at gthreadpoQuit
  (gdb) frame 1
  #1  0xb69b04e8 in gst_fbdevsink_show_frame (videosink=0x10a3378,
      buf=0xb5c08838) at gstfbdevsink.c:269
  269     gstfbdevsink.c: No such file or directory.
  (gdb) p fbdevsink
  $1 = (GstFBDEVSink *) 0x10a3378
  (gdb) p *fbdevsink
  $2 = {videosink = {element = {element = {object = {object = {
              g_type_instance = {g_class = 0x10a2d60}, ref_count = 3,
              qdata = 0x0}, lock = {p = 0x0, i = {0, 0}},
            name = 0x10a2f30 "fbdevsink0", parent = 0x10a70a0, flags = 32,
            control_bindings = 0x0, control_rate = 100000000,
            last_sync = 18446744073709551615, _gst_reserved = 0x0},
          state_lock = {p = 0x109f9a8, i = {0, 0}}, state_cond = {p = 0x0, i = {
              3, 0}}, state_cookie = 2, target_state = GST_STATE_PAUSED,
          current_state = GST_STATE_READY, next_state = GST_STATE_PAUSED,
          pending_state = GST_STATE_PAUSED,
          last_return = GST_STATE_CHANGE_ASYNC, bus = 0x108bcb8, clock = 0x0,
          base_time = 0, start_time = 0, numpads = 1, pads = 0x109cc20,
          numsrcpads = 0, srcpads = 0x0, numsinkpads = 1, sinkpads = 0x109cc30,
          pads_cookie = 1, _gst_reserved = {0x0, 0x0, 0x0, 0x0}},
        sinkpad = 0x10a6170, pad_mode = GST_PAD_MODE_PUSH, offset = 0,
        can_activate_pull = 0, can_activate_push = 1, preroll_lock = {p = 0x1,
          i = {1, 0}}, preroll_cond = {p = 0x0, i = {0, 0}}, eos = 0,
        need_preroll = 1, have_preroll = 0, playing_async = 1,
        have_newsegment = 1, segment = {flags = GST_SEGMENT_FLAG_NONE, rate = 1,
          applied_rate = 1, format = GST_FORMAT_TIME, base = 0, offset = 0,
          start = 0, stop = 18446744073709551615, time = 0, position = 33333333,
          duration = 18446744073709551615, _gst_reserved = {0x0, 0x0, 0x0,
            0x0}}, clock_id = 0x0, sync = 1, flushing = 0, running = 0,
        max_lateness = 20000000, priv = 0x10a3188, _gst_reserved = {
          0x0 <repeats 20 times>}}, width = 0, height = 0, priv = 0x10a3180,
      _gst_reserved = {0x0, 0x0, 0x0, 0x0}}, fixinfo = {
      id = '\000' <repeats 15 times>, smem_start = 1078984704,
      smem_len = 4608000, type = 0, type_aux = 0, visual = 2, xpanstep = 1,
      ypanstep = 1, ywrapstep = 0, line_length = 3840, mmio_start = 0,
      mmio_len = 0, accel = 0, capabilities = 0, reserved = {0, 0}}, varinfo = {
    xres = 800, yres = 480, xres_virtual = 1920, yres_virtual = 1200,
    xoffset = 0, yoffset = 0, bits_per_pixel = 16, grayscale = 0, red = {
      offset = 11, length = 5, msb_right = 0}, green = {offset = 5,
      length = 6, msb_right = 0}, blue = {offset = 0, length = 5,
      msb_right = 0}, transp = {offset = 0, length = 0, msb_right = 0},
      nonstd = 0, activate = 0, height = 4294967295, width = 4294967295,
      accel_flags = 1, pixclock = 0, left_margin = 0, right_margin = 0,
      upper_margin = 0, lower_margin = 0, hsync_len = 0, vsync_len = 0,
      sync = 0, vmode = 0, rotate = 0, colorspace = 0, reserved = {0, 0, 0, 0}},
    fd = 5,
    framebuffer = 0xb654a000 <error: Cannot access memory at address 0xb654a000>, device = 0x10a38d8 "/dev/fb0", width = 320, height = 240, cx = 240, cy = 120,
    linelen = 1280, lines = 240, bytespp = 4, fps_n = 30, fps_d = 1}
  (gdb) p map
  $3 = {memory = 0xb5d24008, flags = GST_MAP_READ,
    data = 0xb5d24058 '\377' <repeats 90 times>, "\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\340\377\377\a\377\a\377\a\377\a\377\a\377\a\377\a\377\a\377\a"...,
    size = 153600, maxsize = 153603, user_data = {0x0,
      0xb69e3ba4 <gst_base_sink_set_last_buffer_unlocked+92>, 0x10a3378, 0x0},
    _gst_reserved = {0x1, 0x10a3378, 0xb6f50dd8 <_gst_debug_min>, 0xb5c08838}}
  (gdb) p i
  $4 = 121

Fix this by changing the fbdevsink->bytespp calculation using
the frame buffer xres_virtual size instead of xres.

https://bugzilla.gnome.org/show_bug.cgi?id=762482
2016-02-23 11:36:57 +02:00
Vineeth TM
9900b08512 uvch264_src: Fix caps memory leak
v4l_caps and new_caps are being allocated new memory before freeing the
old allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=761108
2016-02-17 08:57:30 +00:00
Vineeth TM
8b80137f4b acmenc/acmmp3dec: remove unnecessary break after return
https://bugzilla.gnome.org/show_bug.cgi?id=761109
2016-02-16 18:03:51 +02:00
Alessandro Decina
4aaaf23868 applemedia: videotesturecache: let CVOpenGLESTextureCache flush every 1s
Leave kCVOpenGLESTextureCacheMaximumTextureAgeKey to the default (1s). We used
to set it to 0 and flush manually, but apparently (looking at the GLES profiler)
0 means "disable the cache entirely".
2016-02-10 15:40:02 +11:00
Alessandro Decina
99f29ec56e applemedia: vtdec: implement GstElement::set_context 2016-02-09 14:13:26 +11:00
Alessandro Decina
915124b363 applemedia: vtdec: update copyright 2016-02-09 14:13:26 +11:00
Alessandro Decina
e34fe9fe70 applemedia: avfvideosrc: implement GstElement::set_context
Needed to properly handle gst.gl.app_context(s).
2016-02-09 14:13:26 +11:00
Alessandro Decina
022e060563 applemedia: avfvideosrc: add myself to the copyright holders 2016-02-09 14:13:26 +11:00
Matthew Waters
cd4a93da3b glsyncmeta: separate out gpu/cpu waits.
CPU waits are more expensive and are only required if the CPU is ever going to
access the data. GPU waits perform inter-context synchronisation and are cheaper
as they don't require CPU intervention.
2016-02-09 12:30:25 +11:00
Arun Raghavan
94f1748b6b tinyalsasink: Use glib CLAMP() instead of our own macro 2016-02-05 21:35:15 +05:30
Arun Raghavan
5f9065c114 tinyalsasink: Limit period size and count to what the h/w permits 2016-02-05 15:56:05 +05:30
Matthew Waters
9efdfb1a29 amcvideodec: pass the correct time value to wait_for_sync
When we are not waiting, we need to pass -1 to signal that we just want to check
that the frame was/n't rendered.  Avoids waiting for frames that will never be
rendered.

https://bugzilla.gnome.org/show_bug.cgi?id=761014
2016-02-04 15:46:22 +11:00
Matthew Waters
3c29dcaddb amcvideodec: advance the ready counter ourselves when render=FALSE
When not rendering the video frame, e.g. when freeing an unreleased sync frame,
we will not receive a frame listener callback.

Reduces the amount of 'on_frame_available miss detected' messages when dropping
frames.

https://bugzilla.gnome.org/show_bug.cgi?id=761014
2016-02-04 15:46:22 +11:00
Jan Schmidt
0d3cd82749 decklinkaudiosrc: Fix discont tracking
Don't reset the marker that's tracking disconts until
either the discont disappears or we resync.
2016-02-04 14:33:09 +11:00
Tim-Philipp Müller
501930dc0d Remove ancient and dead cdrom control plugin
This was never even ported to 0.10, and I don't think
it's particularly useful, since it's just a control
interface really. Let's remove it.
2016-02-03 21:22:28 +00:00
Reynaldo H. Verdejo Pinochet
2da52e79b3 tinyalsasink: fix tinalsa typo 2016-02-02 13:30:29 -08:00
Reynaldo H. Verdejo Pinochet
4c5abcb997 tinyalsasink: fix sample launch line 2016-02-02 11:06:52 -08:00
Arun Raghavan
bb240714fb tinyalsasink: Use int type if we support a single rate/channel count
Avoids using an int range if the field we're setting is not actually a
range.
2016-02-02 16:38:31 +05:30
Arun Raghavan
c8bd74fa9a tinyalsa: Add a new sink plugin using tinyalsa
This uses the tinyalsa library to playback to an ALSA device. Future
work can include using the mmap interface.

https://bugzilla.gnome.org/show_bug.cgi?id=761230
2016-02-02 08:30:59 +05:30
Tim-Philipp Müller
0770fa4ed5 dvbsrc: drop unnecessary use of _stdint.h 2016-01-30 17:35:33 +00:00
Matthew Waters
b276de7827 amcvideodec: guard against not finding a valid frame in loop
Fixes sporadic crashes on finishing decoding a video.

https://bugzilla.gnome.org/show_bug.cgi?id=761014
2016-01-29 23:52:15 +11:00
Matthew Waters
1fceac8122 amcvideodec: set our data pointer in java to NULL on close
The frame available callback can be called after deconfiguring the amc codec.
Guard against this by setting the back pointer to NULL on close() and ignoring
any NULL data pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=761014
2016-01-29 23:52:15 +11:00
Alessandro Decina
045a935871 applemedia: refactor GL context code
Rework the GL context code. Now both avfvideosrc and vtdec can create an
internal GL context for pushing textures. Both elements will still try to
use/switch to a local context where available (including after RECONFIGURE
events).
2016-01-29 15:10:32 +11:00
Alessandro Decina
6f80d5c59a applemedia: avfvideosrc: actually set the configured framerate
Actually set the configured framerate. Before we only used to set the first
matching framerate range. On iOS where the camera reports ranges [2, 60], we
used to configure the camera to output anything between 2 and 60fps.
2016-01-27 14:38:36 +11:00
Sebastian Dröge
c9d9042aff ahc: Fail gracefully if our callback class can't be found
Instead of just ignoring that error and then calling JNI functions with NULL,
which will kill the virtual machine.

The error handling here needs some further improvements though, errors in more
places are just ignored.
2016-01-22 17:25:28 +02:00
Sebastian Dröge
551b0a5f28 ahc: Initialize GError pointer with NULL
Otherwise there will be assertions.
2016-01-22 17:22:47 +02:00
Sebastian Dröge
f585a66bd1 amcvideodec: Only free GstAmcBuffer if it's not NULL
And also free it on GL errors.
2016-01-22 17:19:29 +02:00
Julien Moutte
3ea431c5b5 decklinkvideosrc: implement RGB capture support
Combine mode and format to generate caps and support the flags from VideoChanged callback to support RGB capture.

https://bugzilla.gnome.org/show_bug.cgi?id=760594
2016-01-22 16:11:08 +01:00
Sebastian Dröge
8c57341241 amc: Add an assertion for NULL GErrors
Should never happen! But an assertion is better than a NULL pointer
dereference.
2016-01-22 16:22:25 +02:00
Sebastian Dröge
31e1b7ceeb ahc: Fix indentation 2016-01-22 16:14:46 +02:00
Sebastian Dröge
5a3744e86c amc: MediaCodec::getOutputBuffer() can return NULL without exception
Happens when doing zerocopy rendering, or when passing a wrong index to it.
Handle this properly for zerocopy rendering, fail properly for the other
cases.

https://bugzilla.gnome.org/show_bug.cgi?id=760961
2016-01-22 16:13:45 +02:00
Alessandro Decina
c2a57f3555 applemedia: texture cache: copy the input metas
Copy the input metas so avfvideosrc and vtenc can fast path to using
CVPixelBuffer(s) even when using GLMemory.
2016-01-22 13:53:32 +11:00
Nicolas Dufresne
09dbc5b298 ahcsrc: Fix latency reporting
Currently it was wrongly reporting min/max as being the shortest and
longest possible frame duration. This is not how latency works in
GStreamer.

Fix by reporting min latency as being the longest possible duration of
one frame. As we don't know how many buffers the stack can accumulate, we
simply assume that max latency is the same (the usual default behaviour).
2016-01-21 13:49:18 -05:00
George Kiagiadakis
9a53d79876 ahcsrc: fix deadlock when flushing
_data_queue_item_free() calls gst_buffer_unref(), which
calls gst_ahc_src_buffer_free_func(), which calls
g_mutex_lock() on self->mutex and there you go... deadlock!
2016-01-21 13:49:18 -05:00
Justin Kim
f1809c4d93 ahcsrc: porting from 0.10 to 1.0 2016-01-21 13:49:17 -05:00
Justin Kim
becaf2852d move androidcamera into androidmedia
This commit is a part of portng android hardware camera from 0.10 implementation.
To preserve history and get diff clearly, the interesting files are moved to
deployment directory and the remaining files are removed.
2016-01-21 13:49:17 -05:00
Youness Alaoui
fe288a847b androidcamera: Separate release and free APIs 2016-01-21 13:49:17 -05:00
Youness Alaoui
c84878ad4b androidmedia: Fix get_level and get_profile exception checking by not using return 2016-01-21 13:49:17 -05:00
Youness Alaoui
86f2535c41 androidmedia: Add extern gint declarations 2016-01-21 13:49:16 -05:00
Youness Alaoui
11b28224b5 androidcamera: Small refactor in case open doesn't throw an exception but returns null 2016-01-21 13:49:16 -05:00
Sebastian Dröge
acfb1c44a7 androidcamera: Fix some compiler warnings 2016-01-21 13:49:16 -05:00
Sebastian Dröge
64b869ea40 dvm: Rename gst-dvm.[ch] to gstdvm.[ch] for consistency with other GStreamer code 2016-01-21 13:49:15 -05:00
Sebastian Dröge
e3801c041f androidmedia: Make everything compile with the new wrappers 2016-01-21 13:49:15 -05:00
Sebastian Dröge
ade8590778 androidmedia: Add remaining bits of the Java wrappers using libgstdvm 2016-01-21 13:49:15 -05:00
Sebastian Dröge
ea43e42ca5 androidmedia: Remove g_return_if_fails()
This is not public API so it has no advantage to have them here.
2016-01-21 13:49:14 -05:00
Youness Alaoui
3ac90867ac androidmedia: Use gst-dvm and refactor java wrappers (WIP)
Moved the java wrapper API into its own files and made use of the
gst-dvm macros. Also renamed the API to have the proper naming
convention and coding style in order to match the one in androidcamera.
This is a work in progress! "android/media/MediaCodecList" is still missing
and the actual elements have not been ported to use the new function names.
2016-01-21 13:49:14 -05:00
Youness Alaoui
eb949625b9 androidcamera: Add G_BEGIN/END_DECLS to the .h 2016-01-21 13:49:14 -05:00
Youness Alaoui
4a2a73b13f gst-dvm: Create a gst-dvm library using part of androidcamera 2016-01-21 13:49:10 -05:00
Youness Alaoui
5d90cc85cb androidcamera: Adding a device-name property 2016-01-21 13:48:45 -05:00
Youness Alaoui
ebbf475437 androidcamera: Add element documentation 2016-01-21 13:48:44 -05:00
Youness Alaoui
178ef6e9b7 androidcamera: Prettify the gstahccallback.c generation line in the makefile 2016-01-21 13:48:44 -05:00
Youness Alaoui
0cc2e86492 androicamera: Make sure the TMP env var exists and check for DEX var too 2016-01-21 13:48:44 -05:00
Youness Alaoui
42ea071c6c androidcamera: Do not use gst_list_free_full since it requires glib 2.28 2016-01-21 13:48:43 -05:00
Youness Alaoui
832c7adc76 androidcamera: Add smooth-zoom property for smooth zooming feature 2016-01-21 13:48:43 -05:00
Youness Alaoui
9232685782 androidcamera: Add focal-length, view-angle and video-stabilization properties 2016-01-21 13:48:43 -05:00
Youness Alaoui
eea2904e9d androidcamera: Add video stabilization API 2016-01-21 13:48:43 -05:00
Youness Alaoui
a79beef1c3 androidcamera: Add property probe for the photography properties 2016-01-21 13:48:42 -05:00
Youness Alaoui
f69448ef13 androidcamera: Small refactor 2016-01-21 13:48:42 -05:00
Youness Alaoui
0a8804110f androidcamera: Fix small memleak 2016-01-21 13:48:42 -05:00
Youness Alaoui
0a2530ef79 androidcamera: Store GParamSpec for properties and use that for the PropertyProbe comparison 2016-01-21 13:48:42 -05:00
Youness Alaoui
dd78e052ae androidcamera: Handle zoom comparison better, and avoid float precision issue 2016-01-21 13:48:41 -05:00
Youness Alaoui
5975d396e0 androidcamera: Fix EV compensation support 2016-01-21 13:48:41 -05:00
Youness Alaoui
08298ef7f5 androidcamera: Implement new GstPhotography enums 2016-01-21 13:48:41 -05:00
Youness Alaoui
01d6df438d androidcamera: Do not advertise zoom capabilities if camera doesn't support zoom 2016-01-21 13:48:41 -05:00
Youness Alaoui
39d7729476 androidcamera: Be NULL-safe when a JNI list is returned 2016-01-21 13:48:41 -05:00
Youness Alaoui
dae0337d91 androidcamera: Use strcmp on the GParamSpec property name
Use strcmp instead of using the property_id because it's overriden
2016-01-21 13:48:12 -05:00
Youness Alaoui
49a40edae9 androidmedia: Implement property probe for zoom and ev_compensation 2016-01-21 13:48:03 -05:00
Youness Alaoui
1ef65636d1 androidcamera: Add autofocus support 2016-01-21 13:47:53 -05:00
Youness Alaoui
24b29d4266 androidcamera: Override properties 2016-01-21 13:47:52 -05:00
Youness Alaoui
2d45a878b4 anroidcamera: Add support for the GstPhotography interface 2016-01-21 13:47:52 -05:00
Youness Alaoui
77ba73ca7e androidcamera: Add more wrappers for the Camera.Parameters class 2016-01-21 13:47:52 -05:00
Youness Alaoui
2e745fa1b1 androidcamera: Send proper error when unable to open camera 2016-01-21 13:47:52 -05:00
Youness Alaoui
02f36d92bc androidcamera: Adding device-orientation and device-facing properties 2016-01-21 13:47:49 -05:00
Youness Alaoui
a08c895303 androidcamera: Add device property and property probe it 2016-01-21 13:47:27 -05:00
Youness Alaoui
0552bb1b2a androidcamera: Fix memleak and lose of buffer if the data queue is flushing 2016-01-21 13:47:03 -05:00
Youness Alaoui
122083eadb androidcamera: Calling set_preview_callback with NULL frees all the buffers in the queue.
We must not do it at the stop otherwise we lose all our buffers. It's best to do
it during the close, so we free up the resources.
2016-01-21 13:47:03 -05:00
Youness Alaoui
acb15e4178 androidcamera: Drop frames if we don't have a clock and var rename 2016-01-21 13:47:02 -05:00
Youness Alaoui
691ab727b0 androicamera: if buffer size increases, then readd new buffers to the queue and drop old ones
The on_preview callback gets called with NULL if the buffer in the queue is
too small, so we need to handle the case where the array is NULL. Also
there is a bug in the android source which makes it drop one of the buffers
so if we had 5 buffers, and we renegotiate to a higher resolution, then we'd
only get 4 calls to on_preview_frame with NULL, with one being dropped.
This means we can't reallocate the buffers in the if (data == NULL) case
because we might end up with 0 buffers in the end.
2016-01-21 13:47:02 -05:00
Youness Alaoui
c85df6807d androidcamera: If callback is NULL then set it to NULL in jni 2016-01-21 13:47:02 -05:00
Nicolas Dufresne
e3ba219494 androidcamera: Fix debug output 2016-01-21 13:46:52 -05:00
Sebastian Dröge
19e5238379 androidcamera: Chose the smallest range that contains the target framerate 2016-01-21 12:44:43 -05:00
Sebastian Dröge
c633ecc3be androidcamera: Improve negotiation
And make sure we set an FPS range from the supported ones
now instead of a potentially unsupported range.
2016-01-21 12:44:42 -05:00
Sebastian Dröge
08db4f267d androidcamera: Implement LATENCY query 2016-01-21 12:44:42 -05:00
Sebastian Dröge
6cdd4745fe androidcamera: Make sure we always have a valid camera source instance in the buffer free function 2016-01-21 12:44:42 -05:00
Sebastian Dröge
f43897e839 androidcamera: Make sure to not call any callbacks after stopping the camera
Fixes segfaults when rotating the device for example.
2016-01-21 12:44:41 -05:00
Youness Alaoui
1a2bcc769c androidcamera: Fix timestamping issue 2016-01-21 12:44:41 -05:00
Youness Alaoui
25896c5ab7 androidcamera: Add caps negotiation support 2016-01-21 12:44:41 -05:00
Youness Alaoui
bb83c54a87 Add support for getcaps that probes the camera for capabilities 2016-01-21 12:44:41 -05:00
Youness Alaoui
4856d22b9f androidmedia: Drop the first buffer to have proper timestamping 2016-01-21 12:44:40 -05:00
Youness Alaoui
0083adbbed androidmedia: Flush the queue when the source is stopped 2016-01-21 12:44:40 -05:00
Youness Alaoui
dd27b89e95 androidmedia: Allocate/free texture when camera is open/closed 2016-01-21 12:44:40 -05:00
Youness Alaoui
d4717a9639 androidmedia: add a gst_ahc_src_close function 2016-01-21 12:44:39 -05:00
Youness Alaoui
54f3337bd1 androidmedia: Fix small indentation issues 2016-01-21 12:44:39 -05:00
Youness Alaoui
aa390e1be4 androidmedia: Disable plugin if android-sdk isn't found and dynamically search for platform version 2016-01-21 12:44:39 -05:00
Youness Alaoui
e78143f839 androidcamera: Add support for using DexLoader with Embeded GstAhcCallback.jar 2016-01-21 12:44:39 -05:00
Youness Alaoui
d56f094ce6 androidcamera: Fix compilation issues 2016-01-21 12:44:38 -05:00
Youness Alaoui
e42e7317f9 Remove previous cruft and create androidcamera plugin 2016-01-21 12:44:38 -05:00
Youness Alaoui
91219adaf2 Free the buffers and readd the arrays when the queue is cleared 2016-01-21 12:44:38 -05:00
Youness Alaoui
65a6014f26 Add a GST_DVM_CALL macro to ease function calling with exception check 2016-01-21 12:44:37 -05:00
Youness Alaoui
7b8dbd32db Calculate timestamp at reception of the buffer, not when pushing it out 2016-01-21 12:44:37 -05:00
Youness Alaoui
fff14b255c Make the number of callback buffers configurable, and delete their local ref 2016-01-21 12:44:37 -05:00
Youness Alaoui
3c78395e31 Use GstDataQueue instead of GAsyncQueue for storing buffers 2016-01-21 12:44:37 -05:00
Youness Alaoui
4cbfe6fa13 Use the buffer's free_func to map byteArray data without making a copy 2016-01-21 12:11:16 -05:00
Youness Alaoui
af47c1ebdc Remove open failure test code and debug log 2016-01-21 12:11:16 -05:00
Youness Alaoui
666eda11d6 Use YV12 as the default format 2016-01-21 12:11:16 -05:00
Youness Alaoui
7562cc2e26 Add a deinit function and remove jclass references in case of error 2016-01-21 12:11:15 -05:00
Youness Alaoui
37685f09e0 SurfaceTexture constructure needs texture_id 2016-01-21 12:11:15 -05:00
Youness Alaoui
484b0ae658 Add ahcsrc Camera source element prototype 2016-01-21 12:11:15 -05:00
Youness Alaoui
4b975b204c Add android.hardware.Camera (and deps) JNI wrappers 2016-01-21 12:11:14 -05:00
Youness Alaoui
21f60289db Adding Dalvik Virtual Machine routines and macros 2016-01-21 12:11:14 -05:00
Youness Alaoui
347dbf123d androidmedia: Add androidmedia plugin 2016-01-21 12:11:14 -05:00
Alessandro Decina
5c7fb644cd applemedia: vtenc: fix build on iOS 2016-01-19 19:18:43 +11:00
Alessandro Decina
f6154b4cc0 applemedia: always fill GstBuffers with GstMemory
Always fill buffers with our custom memory. The custom memory will avoid
mapping CV/CM buffers unless necessary.
2016-01-19 16:13:04 +11:00
Ilya Konstantinov
8577224c74 applemedia: implement copying of meta
Before this, buffers would lose their Core Video / Core Media meta
over intervideo* boundary.

https://bugzilla.gnome.org/show_bug.cgi?id=747216
2016-01-19 13:06:31 +11:00
Ilya Konstantinov
936b2fdfbc applemedia: implement GstAppleCoreVideoMemory
Implement a new memory type wrapping CVPixelBuffer.

There are two immediate advantages:
 a) Make the GstMemory itself retain the CVPixelBuffer. Previously,
    the containing GstBuffer was solely responsible for the lifetime of
    the backing CVPixelBuffer.

    With this change, we remove the GST_MEMORY_FLAG_NO_SHARE so that
    GstMemory objects be referenced by multiple GstBuffers (doing away
    with the need to copy.)

  b) Delay locking CVPixelBuffer into CPU memory until it's actually
     mapped -- possibly never.

The CVPixelBuffer object is shared among references, shares and
(in planar formats) planes, so a wrapper GstAppleCoreVideoPixelBuffer
structure was introduced to manage locking.

https://bugzilla.gnome.org/show_bug.cgi?id=747216
2016-01-19 12:58:43 +11:00
Alessandro Decina
ed7df2da3c applemedia: iosurfacememory: alloc with g_new0
...since the base class doesn't use g_slice anymore
2016-01-19 12:56:40 +11:00
Matt Crane
eba01f84e5 shmsink: fix possible deadlock in _render()/ _allocator_free()
Drop object lock before unrefing memory, otherwise the object
lock might be taken again from the allocator and then things
deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=760551
2016-01-16 21:46:28 +00:00
Matthew Waters
ffba31b7b2 nvenc: update for recent GL api changes
Specifically the GstGLMemoryPBO addition (which was the unadorned GstGLMemory).
2016-01-12 23:36:54 +11:00
Alessandro Decina
05ccc2f6ea applemedia: avfvideosrc: optionally get the GL context from gst_element_set_context
Allow setting the GL context with gst_element_set_context. When available, the
local context obtained via the context query still has the precedence.
2016-01-12 14:36:02 +11:00
Alessandro Decina
45b40b8467 applemedia: iosurfacememory: remove NO_SHARE flag
The full memory can be safely shared. Sharing a sub region can't be done and
will fail in the base allocator, triggering a copy.
2016-01-12 14:05:01 +11:00
Alessandro Decina
b0f5d4f1d5 applemedia: avfvideosrc: enable renegotiation
We can actually renegotiate now, so remove old check which disabled it.
2016-01-06 16:51:12 +11:00
Alessandro Decina
85df5648bb applemedia: avfvideosrc: small negotiation fix
Fix negotiation when GLMemory is requested but a context is not available
2016-01-06 13:20:17 +11:00
Alessandro Decina
e0d65937bc applemedia: vtenc: accept UYVY on Mac
When doing GLMemory avfvideosrc negotiates UYVY. This change allows avfvideosrc
! tee name=t ! ... ! glimagesink t. ! ... ! gldownload ! vtenc_h264 ! ...
to do GLMemory and 0-copy with the encoder (with the CV meta).
2016-01-06 11:43:37 +11:00
Alessandro Decina
a15d8acff0 applemedia: avfvideosrc: change texture format from BGRA to NV12 on iOS
Change texture format from BGRA to NV12. This allows a pipeline like avfvideosrc
! tee name=t ! ... ! glimagesink t. ! ... ! gldownload ! vtenc_h264 ! ...  to
negotiate GLMemory. This makes the glimagesink branch much faster (obviously)
and triggers the 0-copy path between avfvideosrc and vtenc (using the CV meta).
Combined this results in a huge perf improvement on iOS (25-30% of CPU time in a
pipeline like the one above).

Note that this doesn't introduce a new shader conversion in the sink, since BGRA
textures had to be copied/converted from format=BGRA,texture-target=RECTANGLE to
format=RGBA,texture-target=2D anyway.
2016-01-06 11:43:37 +11:00
Alessandro Decina
bf86d7fef1 applemedia: avfvideosrc: output at highest fps/resolution by default
Fixate to the highest possible resolution and fps. Otherwise by default we end
up fixating at 2fps and the lowest supported resolution, which is hardly what
someone who bought an overpriced smartphone wants.
2015-12-29 10:57:36 +11:00
Matthew Marsh
0e34c02dd6 nvenc: fix high CPU use on initialization of multiple encoders at the same time
We need a static lock to protect various NVENC methods in _set_format(). Without
this the CPU use increases dramatically on initialisation of the element when
there are multiple elements being initialised at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=759742
2015-12-22 13:27:51 +00:00
Vivia Nikolaidou
fafc8e564c decklinkvideosink: Made "auto" mode work according to caps
When the mode of decklinkvideosink is set to "auto", the sink claims to
support the full set of caps that it can support for all modes. Then, every
time new caps are set, the sink will automatically find the correct mode for
these caps and set it.

Caveat: We have no way to know whether a specific mode will actually work for
your hardware. Therefore, if you try sending 4K video to a 1080 screen, it
will silently fail, we have no way to know that in advance. Manually setting
that mode at least gave the user a way to double-check what they are doing.

https://bugzilla.gnome.org/show_bug.cgi?id=759600
2015-12-18 16:08:02 +01:00
Thomas Roos
f9464ce354 directsoundsrc: add device property as it is done in directsoundsink
This allows selection of the device by GUID instead of the name. The name is
user-given and multiple devices can have the same name.

https://bugzilla.gnome.org/show_bug.cgi?id=759484
2015-12-18 12:39:03 +01:00
Sebastian Dröge
d4920948aa directsoundsrc: Convert header from (some) DOS line endings to UNIX
A mix between different line endings in the same file is not a good idea,
and the .c files are both with UNIX line endings so let's use that.
2015-12-18 12:39:03 +01:00
Julien Isorce
89229bcfed applemedia: set -mmacosx-version-min to 10.8
Otherwise qtkitvideosrc fails to build on OSX 10.10.4
because QTKit has been deprecated since OS X 10.9.

Also set -mmacosx-version-min=10.8 in front to allow
the user or cerbero to override the version.

https://bugzilla.gnome.org/show_bug.cgi?id=745564
2015-12-18 10:30:25 +00:00
Alessandro Decina
6961945110 glmemory: add gst_gl_memory_allocator_get_default
Add gst_gl_memory_allocator_get_default to get the default allocator based on
the opengl version. Allows us to stop hardcoding the PBO allocator which isn't
supported on gles2.

Fixes GL upload on iOS9 among other things.
2015-12-18 14:25:32 +11:00
Matthew Waters
5dcd500257 gl*memory*: reverse the parameter order of user_data and destroy notify
The convention is to have the destroy notify last after any user data
2015-12-17 15:44:22 +11:00
Alessandro Decina
491e2eefcb applemedia: fix build on iOS
Fix build after 779dc3132c
2015-12-17 15:07:33 +11:00
Alessandro Decina
4f550ff50f applemedia: avfvideosrc: do fixate 2015-12-17 14:49:13 +11:00
Matthew Waters
779dc3132c glmemorypbo: remove our own alloc()/wrapped()/etc functions
replaced by equivalent functionality within gst_gl_base_memory_alloc()
2015-12-17 13:49:56 +11:00
Matthew Waters
650e5c4fe5 glmemory: implement GstGLBaseMemory::alloc
- Create GstGLVideoAllocationParams which is a GstGLAllocationParams subclass.
- Make it possible to allocate glmemory objects directly if no frills are
  needed.
2015-12-17 13:49:55 +11:00
Sebastian Dröge
4b04d4a02d applemedia: Link to IOSurface.framework for the IOSurface API 2015-12-16 10:21:59 +01:00
Sebastian Dröge
34586e0ffd applemedia: Link to IOKit.framework for IOSurface related functions 2015-12-16 09:39:03 +01:00
Alessandro Decina
fe42e302dd applemedia: vtdec: fix texture-target on iOS 2015-12-16 17:03:04 +11:00
Alessandro Decina
89b6c296ad applemedia: vtdec: remove obsolete FIXME 2015-12-16 17:03:04 +11:00
Alessandro Decina
bbdb22efba applemedia: avfvideosrc: rework GLMemory negotiation
Only do GLMemory when a GstGLContext is available AND GLMemory is actually
negotiated with downstream.
2015-12-16 17:03:04 +11:00
Alessandro Decina
0a73abd448 applemedia: avfvideosrc: update after IOSurface changes
Prefer GLMemory over sysmem. Also now when pushing GLMemory we push the
original formats (UYVY in OSX, BGRA in iOS) and leave it to downstream to
convert.
2015-12-16 17:03:04 +11:00
Alessandro Decina
9981cd8327 applemedia: vtdec: remove the internal GstGLColorConvert
It was added back in the day to make texture sharing work by default with
glimagesink inside playbin. These days glimagesink accepts (and converts) YUV
internally so it's no longer needed.
2015-12-16 17:03:03 +11:00
Alessandro Decina
07bf3796aa applemedia: vtdec: decouple outputting textures from outputting RGBA
We're going to be able to output NV12 textures soon.
2015-12-16 17:03:03 +11:00
Alessandro Decina
8ae0033261 applemedia: vtdec: switch to IOSurface on Mac
Switch to using IOSurface instead of CVOpenGLTextureCache on OSX. The latter can't be
used anymore to do YUV => RGB with opengl3 on El Capitan as GL_YCBCR_422_APPLE
has been removed from the opengl3 driver. Also switch to NV12 from UYVY, which
was the only YUV format supported by CVOpenGLTextureCache.
2015-12-16 17:03:03 +11:00
Alessandro Decina
e730b0a8ab applemedia: rename GstCoreVideoTextureCache to GstVideoTextureCache
First of a few commits to stop using CVOpenGLTextureCache on OSX and use
IOSurfaces directly instead. CVOpenGLTextureCache hasn't been updated for OpenGL
3 which is why texture sharing is currently disabled on OSX.
2015-12-16 17:03:03 +11:00
Alessandro Decina
a8b01eb6d1 Revert "vtdec: disable the texture cache on OSX"
This reverts commit f02425c4af.
2015-12-16 17:03:03 +11:00
Vineeth TM
7c42ba97d7 plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2015-12-15 10:30:49 +00:00
Matthew Waters
3088063ebd applemedia: update for GLMemory API changes 2015-12-14 19:18:14 +11:00
Matthew Waters
fd3203cfeb amcvideodec: update for GLMemory API changes 2015-12-14 19:15:14 +11:00
Thomas Roos
d794908dfd directsoundsrc: Check return values of DirectSound functions in read loop
Otherwise we might end up in an infinite loop because of errors.

Also take the element's mutex in unprepare().

https://bugzilla.gnome.org/show_bug.cgi?id=738292
2015-12-11 12:46:41 +02:00
Frédéric Wang
47d2a13d48 acm: Port ACM MP3 decoder and encoders to GStreamer 1.x
https://bugzilla.gnome.org/show_bug.cgi?id=744047
2015-12-07 13:25:28 +02:00
Sebastian Dröge
d8b1efe13a d3dvideosink: Don't try to recreate swapchain while the window is minimized
It will fail and cause the sink to crash. Instead wait until the window is
visible again before checking if the swapchain really has to be recreated.

https://bugzilla.gnome.org/show_bug.cgi?id=741608
2015-11-30 19:53:28 +02:00
Mathias Hasselmann
d387bfd188 androidmedia: Don't add metadata to locked buffer
The video decoders tried calling gst_buffer_add_*meta() on non-writable
buffer resulting in warnings of this kind:

  gstamcvideodec.c:921 (_gl_sync_render_unlocked): WARNING: amcvideodec
  Failed to create the transformation meta for the gl_sync 0xabc03848
  buffer 0xabb01b40 (0)

https://bugzilla.gnome.org/show_bug.cgi?id=758694
2015-11-26 22:24:26 +11:00
Matthew Waters
ab3fd36d64 amcvideodec: move release_output_buffer into the sync meta
Some devices only ever keep one buffer available in the GL queue resulting in
multiple calls to release_output_buffer only causing one frame to be rendered.
If there is a queue after amcvideodec (even playsink's small one), then
multiple buffers are pushed but only a small fraction of them are actually
rendered on time.  The rest will either render some number of frames ahead of
where they are meant to be or timeout waiting for a frame that's already been
rendered.

Solved by moving the release_output_buffer into the sync_meta the is pushed
downstream.  When downstream renders, the custom sync implementation attempts
to release the current buffer (if not already released) and render. Once the
frame has been rendered to the screen, the next frame is released and is
hopefully available by the time the next frame is to be rendered.

This fixes a perceived frame jitter in the output.
2015-11-19 19:25:48 +11:00
Reynaldo H. Verdejo Pinochet
86ec812429 Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-18 16:05:42 -08:00
Sebastian Dröge
96eb5ef33c amcvideodec: Don't require a non-zero buffer size when doing decoding to a surface
At least on some devices/Android versions the buffer size will always be zero
in these cases.

https://bugzilla.gnome.org/show_bug.cgi?id=758228
2015-11-18 09:23:49 +02:00
Sebastian Dröge
be7f4d6cd6 amcvideodec: Fix indentation 2015-11-17 16:21:10 +02:00
Alessandro Decina
3d5a1ccbf4 applemedia: vtdec: fix negotiation more
Year 12: I still don't understand how negotiation works.

Apparently gst_pad_query_caps doesn't do what I thought it did. To get the
actual caps that can flow through vtdec:src we must call gst_pad_peer_query_caps
with the template caps as filter.

Fixes negotiation with stuff that doesn't understand GLMemory (hello videoscale).
2015-11-17 16:15:53 +11:00
Alessandro Decina
94cd5316f3 applemedia: vtdec: minor texture cache fixes
Small fix on how the texture cache is cleaned up / setup in case of renegotiation
2015-11-17 16:15:53 +11:00
Alessandro Decina
3c681045bf applemedia: corevideotexturecache: stop configuring cache->convert over and over 2015-11-17 16:15:53 +11:00
Matthew Waters
3bf7430411 glimagesink: wait on the correct sync meta when rendering 2015-11-17 15:27:26 +11:00
Matthew Waters
f2ca0eaf27 amcviddec: output external-oes textures
This provides a performance and power usage improvement by removing
the texture copy from an OES texture to 2D texture.

The flow is as follows
1. Generate the output buffer with the required sync meta with the incrementing
   push counter and OES GL memory
1.1 release_output_buffer (buf, render=true) and push downstream
2. Downstream waits for on the sync meta (timed wait) or drops the frame (no wait)
2.1 Timed wait for the frame number to reach the number of frame callbacks fired
2.2 Unconditionally update the image when the wait completes (success or fail).
    Sets the affine transformation matrix meta on the buffer.
3. Downstream renders as usual.

At *some* point through this the on_frame_callback may or may not fire.  If it
does fire, we can finish waiting early and render. Otherwise we have to
wait for a timeout to occur which may cause more buffers to be pused into the
internal GL queue which siginificantly decreases the chances of the
on_frame_callback to fire again.  This is because the frame callback only occurs
when the internal GL queue changes state from empty to non-empty.

Because there is no way to reliably correlate between the number of buffers
pushed and the number of frame callbacks received, there are a number of
workarounds in place.
1. We self-increment the ready counter when it falls behind the push counter
2. Time based waits as the frame callback may not be fired for a certain frame.
3. It is assumed that the device can render at speed or performs some QoS of
   the interal GL queue (which may not match the GStreamer QoS).

It holds that we call SurfaceTexture::updateTexImage for each buffer pushed
downstream however there's no guarentee that updateTexImage will result in
the exact next frame (it could skip or duplicate) so synchronization is not
guaranteed to be accurate although it seems to be close enough to be unable
to discern visually.  This has not changed from before this patch.  The current
requirement for synchronization is that updateTexImage is called at the point in
time when the buffers is to be rendered.

https://bugzilla.gnome.org/show_bug.cgi?id=757285
2015-11-17 15:27:26 +11:00
Alessandro Decina
35052fdfd0 applemedia: vtdec: fix setting internal SKIP / DROP flags 2015-11-17 15:19:01 +11:00
Alessandro Decina
119e09eac3 applemedia: vtdec: improve negotiation
Rework negotiation implementing GstVideoDecoder::negotiate. Make it possible to
switch texture sharing on and off at runtime. Useful to (eventually) turn
texture sharing on in pipelines where glimagesink is linked only after
decoding has already started (for example OWR).
2015-11-17 12:59:58 +11:00
Alessandro Decina
8f14882b44 applemedia: vtdec: improve handing of decode errors/frame drops
Improve decode error handling by avoiding calling into GstVideoDecoder from the
VT decode callback. This removes contention on the GST_VIDEO_DECODER_STREAM_LOCK
which used to make the decode callback slow enough for VT to start dropping lots
of frames once the first frame was dropped.
2015-11-17 12:59:58 +11:00
Alessandro Decina
8a171754e5 applemedia: vtdec: fix uninitialized variable warning 2015-11-17 12:59:58 +11:00
Heinrich Fink
788ff2f98e vtenc: Set profile_level to NULL after release
Otherwise, gst_vtenc_negotiate_profile_and_level will double-release as
it checks for profile_level != NULL. This caused crashes when the
vtenc instance is stopped and then restarted.

https://bugzilla.gnome.org/show_bug.cgi?id=757935
2015-11-11 14:49:58 +01:00
Alessandro Decina
75ad1246a2 applemedia: fix vtdec texture sharing on ios 9.1
Use gst_gl_sized_gl_format_from_gl_format_type to get the format passed to
CVOpenGLESTextureCacheCreateTextureFromImage. Before this change extracting the
second texture from the pixel buffer was failing on ios 9.1.
2015-11-10 14:24:42 +11:00
Tim-Philipp Müller
8a78e788b0 dshow: fix GList leak
_remove_link() would not free the actual list nodes.
2015-11-06 13:00:55 +00:00
Luis de Bethencourt
508451005d dvbsrc: use GST_STIME_ARGS for GstClockTimeDiff
No need to use G_GINT64_FORMAT for potentially negative values of
GstClockTimeDiff. Since 1.6 these can be handled with GST_STIME_ARGS.
Plus it creates more readable values in the logs.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-03 15:05:43 +00:00
Luis de Bethencourt
1ba4d63d6a amcvideodec: use GST_STIME_ARGS for GstClockTimeDiff
No need to manually handle negative value of deadline, GST_STIME_ARGS does
exactly this.
2015-11-03 15:00:28 +00:00
Alessandro Decina
5336cc9ff6 Revert "vtenc: free input buffer ASAP"
This reverts commit 6101fc57b8.

GstVideoEncoder assumes that the input buffer is available until _finish_frame.

https://bugzilla.gnome.org/show_bug.cgi?id=756951
2015-11-02 20:16:15 +11:00
Philippe Renon
c4657f4276 ksvideosrc: don't try to align current timestamp on previous timestamp
this causes frames to be dropped.

Based on a patch by Sebastian Dröge

https://bugzilla.gnome.org/show_bug.cgi?id=748337
2015-11-01 11:16:36 +02:00
Matthew Waters
34c523c3b9 vtdec: fix compilation error
Undefined symbols for architecture x86_64:
  "__gl_target_to_gst", referenced from:
      __do_get_gl_buffer in libgstapplemedia_la-corevideotexturecache.o
2015-10-30 16:38:17 +11:00
Matthew Waters
ccce217502 glcolorconvert: add support for converting texture targets
Solved with a simple shader templating mechanism and string replacements
of the necessary sampler types/texture accesses and texture coordinate
mangling for rectangular and external-oes textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
e61d504556 glmemory: add support for rectangle textures
Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
c6f2426a7a androidmedia: fix build errors
printf %lld instead of G_GINT64_FORMAT.
Double ret variable declaration.
2015-10-21 05:33:13 +11:00
Matthew Waters
c322806227 amcviddec: use gstcontext to retreive the OpenGL context 2015-10-21 04:27:43 +11:00
Matthieu Bouron
7dbb6681a3 androidmedia: Only allow GL output if the decoder has unknown color formats
If GST_AMC_IGNORE_UNKNOWN_COLOR_FORMATS is set to yes, non-GL output
is still allowed.

https://bugzilla.gnome.org/show_bug.cgi?id=731204
2015-10-21 04:27:43 +11:00
Matthieu Bouron
43b63f304d androidmedia: Add support for GL output in amcvideodec
https://bugzilla.gnome.org/show_bug.cgi?id=731204
2015-10-21 04:27:43 +11:00
Matthieu Bouron
45e287840d androidmedia: Do not flush codec if it is not started 2015-10-21 04:27:43 +11:00
Matthieu Bouron
6ca0be038a androidmedia: Allow object to be NULL in gst_amc_jni_*unref functions 2015-10-21 04:27:43 +11:00
Edward Hervey
88cd44fbd8 androidmedia: Fix debug statement (%d for a gsize argument) 2015-10-21 04:27:43 +11:00
Matthieu Bouron
4ab1e66b2e androidmedia: Improve color format debug messages 2015-10-21 04:27:43 +11:00
Matthieu Bouron
8c46a7704a androidmedia: Improve debug messages 2015-10-21 04:27:43 +11:00
Matthieu Bouron
a038478f1b androidmedia: Do not warn we do not support COLOR_FormatSurface 2015-10-21 04:27:43 +11:00
plamot
e0ffcd30e8 dshowvideosink: Fix 64bit compatibility issue
SetWindowLong works only for 32 bit systems, thus windows events (move/resize)
where not interpreted on 64 bit systems

https://bugzilla.gnome.org/show_bug.cgi?id=756617
2015-10-19 15:23:38 +03:00
Sebastian Dröge
f441b9d5d2 amcvideodec: Properly forward the return value of gst_video_decoder_negotiate()
https://bugzilla.gnome.org/show_bug.cgi?id=756578
2015-10-16 09:12:35 +03:00
Sebastian Dröge
b48524c357 amcvideodec: Implement support for COLOR_QCOM_FormatYVU420SemiPlanar32mMultiView for decoding
https://bugzilla.gnome.org/show_bug.cgi?id=756578
2015-10-16 09:12:35 +03:00
Reynaldo H. Verdejo Pinochet
0ac769194f dvb: simplify ZAP file format parser
Simplify state handing, drop unneeded local vars, etc.
2015-10-09 17:53:52 -07:00
Aleix Conchillo Flaqué
12a2acd7e8 applemedia: dist missing header files
https://bugzilla.gnome.org/show_bug.cgi?id=755852
2015-09-30 09:05:08 +01:00
Matthew Waters
63a7cbf8f1 nvenc: call the parent class on GstElement::set_context 2015-09-29 16:17:22 +10:00
Matthew Waters
b1d13e10af Add Nvidia based hardware encoder element
Currently only h264 is supported

https://bugzilla.gnome.org/show_bug.cgi?id=753405
2015-09-29 15:32:17 +10:00
Sebastian Dröge
9764e22a5c decklink: Add a clock epoch that is used as offset whenever restarting the clock
Otherwise we're going to return times starting at 0 again after shutting down
an element for a specific input/output and then using it again later.

https://bugzilla.gnome.org/show_bug.cgi?id=755426
2015-09-24 09:32:36 +02:00
Sebastian Dröge
e0fd5317df decklink: Disable inputs/outputs in PAUSED->READY to allow going to PAUSED again from there
https://bugzilla.gnome.org/show_bug.cgi?id=755426
2015-09-24 09:32:27 +02:00
Matthew Waters
f02425c4af vtdec: disable the texture cache on OSX
This a workaround until the incompatibility with CVOpenGLTextureCache
and opengl3 contexts is fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=754786
2015-09-18 21:31:15 +10:00
Matthew Waters
578b8432b6 vtdec: gst-indent file 2015-09-18 16:58:21 +10:00
Matthew Waters
3772c8ece6 applemedia/vtdec: fix negotiation errors when resizing glimagesink
GstVideoDecoder has its own logic for detecting when to reconfigure
which ultimately calls decide_allocation and results in a new
texture cache that has not been configured from our reconfigure check.

https://bugzilla.gnome.org/show_bug.cgi?id=755156
2015-09-17 21:14:24 +10:00
Vineeth T M
e98addcc31 avdtputil: fix GError memory leak during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755142
2015-09-17 11:55:49 +02:00
Jan Schmidt
9f890c5935 vtdec: Use R/RG textures for NV12 when the context provides them
Fixes playback to GL memory on iOS, where the colours are messed
up by passing Luminance/LuminanceAlpha textures where
color convert expects R/RG textures.

https://bugzilla.gnome.org/show_bug.cgi?id=754504
2015-09-12 04:33:34 +10:00
Jan Schmidt
0d7d7f6c92 vtdec: Prefer GL output caps.
Prefer GL caps by putting them first in the pad template and
intersecting using GST_CAPS_INTERSECT_FIRST.
2015-09-12 04:33:34 +10:00
Sebastian Dröge
b2149e7bb4 decklinkvideosink: less-than-zero comparison of an unsigned value is never true
Use the correct type, GstClockTimeDiff, instead.

CID 1323742
2015-09-10 14:11:58 +03:00
Sebastian Dröge
b6498c32f3 decklinkvideosink: Handle pipelines where the running time does not start around 0 properly
We were converting all times to our internal running times, that is the time
the sink itself spent in PLAYING already. But forgot to do that for the
running time calculated from the buffer timestamps. As such, all buffers were
scheduled much later if the pipeline's running time did not start at 0.

This happens for example if a base time is explicitly set on the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=754528
2015-09-09 16:59:02 +03:00
Sebastian Dröge
a6744a915b decklinkvideosink: Consider pipeline latency, render delay and ts offset when scheduling frames
Without this, we will schedule all frames too late in live pipelines.

https://bugzilla.gnome.org/show_bug.cgi?id=754666
2015-09-09 16:58:45 +03:00
Kouhei Sutou
21bfa428d1 directsoundsrc: fix build error for 64bit Windows build by MinGW
Casting to UINT from HMIXER generates the following warning with
64bit Windows target MinGW:

    gstdirectsoundsrc.c: In function 'gst_directsound_src_mixer_find':
    gstdirectsoundsrc.c:733:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
         mmres = mixerGetDevCaps ((UINT) dsoundsrc->mixer,
                                  ^
    cc1: all warnings being treated as errors

We can use portable GPOINTER_TO_UINT() macro for this propose.

https://bugzilla.gnome.org/show_bug.cgi?id=754756
2015-09-09 16:57:08 +03:00
Tim-Philipp Müller
536e3742aa Fix file permissions of some files 2015-08-28 19:55:59 +01:00
Arnaud Vrac
697f117ddd configure.ac: fix build when the uvch264 plugin is not selected
Instead of checking for the gstreamer-video-1.0 package is installed,
just assume it is since we already check for the -base dependency.

With this replace the GST_VIDEO_* variables in makefiles and directly
link with libgstvideo.

https://bugzilla.gnome.org/show_bug.cgi?id=753820
2015-08-19 16:52:03 +03:00
Sebastian Dröge
d3dbb69c8e winscreencap: Properly timestamp buffers with the current clock running time instead of doing magic
Also implement framerate handling correctly by borrowing the code from
ximagesrc. GstBaseSrc::get_times() can't be used for that, we have to
implement proper waiting ourselves.
2015-08-03 19:42:56 +03:00
Heinrich Fink
0cc6d16c94 applemedia/avsample: Fix racy cleanup of CA layer
The block that is dispatched async to the main thread assumed the
wrapping GstAvSampleVideoSink to be alive. However, at the time of
the block execution the GstObject instance that is deferenced to access
the CA layer might already be freed, which caused occasional crashes.
Instead, we now only pass the CoreAnimation layer that needs to be
released to the block. We use __block to make sure the block is not
increasing the refcount of the CA layer again on its own.

https://bugzilla.gnome.org/show_bug.cgi?id=753081
2015-07-31 12:59:00 +10:00
Sebastian Dröge
431c4b5e84 amcvideoenc: Always set i-frame-interval setting
Most encoders fail to initialize if we don't set it at all.
2015-07-29 10:13:17 +01:00
Nicolas Dufresne
01816b861f bluez: Add built sources to CLEANFILES 2015-07-25 09:03:27 -04:00
Ilya Konstantinov
bfa054a733 vtdec: handle non-consecutive GstBuffer input without copying
CMBlockBuffer offers a model similar to GstBuffer, as it can
consist of multiple non-consecutive memory blocks.

Prior to this change, what we were doing was:

 1) Incorrect:

   CMBlockBufferCreateWithMemoryBlock does not copy the data,
   but we gst_buffer_unmap'd right away.

 2) Inefficient:

   If the GstBuffer consisted of non-contiguous memory blocks,
   gst_buffer_map resulted in malloc / memcpy.

With this change, we construct a CMBlockBuffer out of individual mapped
GstMemory objects. CMBlockBuffer is made to retain the GstMemory
objects (through the use of CMBlockBufferCustomBlockSource), so the
original GstBuffer can be unref'd.

https://bugzilla.gnome.org/show_bug.cgi?id=751241
2015-07-13 11:11:04 -04:00
Matthew Waters
c1906f1cfe applemedia/avsample: fix unconditional use of OSX 10.10 API
We can just not use the error/status properties

https://bugzilla.gnome.org/show_bug.cgi?id=746631
2015-07-13 23:26:14 +10:00
Rico Tzschichholz
d533bfddb5 bluez: Fix make dist while bluez >= 5 is not available 2015-07-10 09:52:07 +05:30
Edward Hervey
e8523446d8 bluez: Include new file in dist'ed files
Fixes make distcheck and tarball generation
2015-07-09 11:06:00 +02:00
Luis de Bethencourt
7d08d56527 bluez: remove unnecessary goto
All goto fail happen before ret is set. ret must be NULL, and the only
thing the fail statement block does is return NULL. Replacing the jumps to
do this return directly.

CID #1311329
2015-07-08 12:23:51 +01:00
Sebastian Dröge
42a1a95f3e androidmedia: Add support for H265/HEVC 2015-07-08 11:42:48 +03:00
Ilya Konstantinov
cc3d79f7cc vtdec: fix refcount error in error handling
https://bugzilla.gnome.org/show_bug.cgi?id=751641
2015-07-07 20:18:50 +03:00
Nick Stoughton
2aa0eba673 bluez: refactor to use glib and add connection state tracking 2015-07-03 15:41:52 +05:30
Vineeth TM
96d691694a amc: fix check whether we managed to acquire a buffer
https://bugzilla.gnome.org/show_bug.cgi?id=751821
2015-07-02 09:14:45 +01:00
Sebastian Dröge
d5a676aec8 androidmedia: Call initialize_classes() also when we got the Java VM from the app
https://bugzilla.gnome.org/show_bug.cgi?id=751664
2015-06-29 18:51:04 +02:00
Luis de Bethencourt
bf2f4f5c8c docs: decodebin2 -> decodebin 2015-06-25 11:02:45 +01:00
Ilya Konstantinov
ad8bf99f04 applemedia: enable sharing of CMBlockBuffer data
Instead of wrapping with GST_MEMORY_FLAG_NO_SHARE, we make the GstMemory
object retain the underlying CMBlockBuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=751072
2015-06-25 10:49:05 +02:00
Ilya Konstantinov
8cd65c3250 applemedia: CMBlockBuffer can be non-contiguous
CMBlockBufferGetDataLength would return the entire data length, while
size of individual blocks can be smaller. Iterate over the block buffer
and add the individual (possibly non-contiguous) memory blocks.

https://bugzilla.gnome.org/show_bug.cgi?id=751071
2015-06-25 10:33:54 +02:00
Ilya Konstantinov
58ce6d50a0 avfvideosrc: add frame rate range to caps
When AVFoundation indicates a supported frame rate range, add it to
the caps. This is important for devices such as the iPhone 6, which
indicate a single AVFrameRateRange of 2fps - 60fps.

https://bugzilla.gnome.org/show_bug.cgi?id=751048
2015-06-22 18:22:57 +02:00
Tim-Philipp Müller
1a182e7a41 uvch264src: fix small leak in caps query handler
gst_query_set_caps_result() does not take ownership of the caps.
2015-06-22 09:23:12 +01:00
Vineeth TM
dd3f3142bc uvch264_src: add missing break in caps query handler
There is a missing break statement in switch,
which will result in executing default case as well
resulting in wrong behavior

https://bugzilla.gnome.org/show_bug.cgi?id=751305
2015-06-22 09:20:18 +01:00
Sebastian Dröge
6b2800e324 androidmedia: Allow the application to provide the Java VM
In JNI_OnLoad() we will already get the Java VM passed and could
just directly use that. gstreamer_android-1.0.c will now provide
this to us.

Reason for this is that apparently not all Android system are
providing the JNI functions to get the currently running Java VMs, so
we would fail to get. With this we will always be able to get the Java
VM on such systems.
2015-06-18 14:38:04 +02:00
Sebastian Dröge
c51b012991 androidmedia: Prefer software codecs over hardware codecs for audio
Hardware codecs don't make sense for audio and are generally less reliable on
Android than the software codecs.
2015-06-18 14:31:39 +02:00
Sebastian Dröge
26396bfac2 androidmedia: Failing to detach a thread is not that much of a problem
Someone else might have detached it before us, so make this just normal debug
output instead of a GST_ERROR()
2015-06-18 14:29:33 +02:00
Sebastian Dröge
ade625111e androidmedia: Don't fail if JNI_CreateJavaVM can't be found
We only need that if no Java VM is running yet, and all usual cases,
i.e. when calling GStreamer from an actual Android app, there will already
be a Java VM we can just use.

It seems like some phones come without that symbol, let's hope they come
with the other symbol but for now don't make a missing JNI_CreateJavaVM fatal.
2015-06-18 10:45:24 +02:00
Sebastian Dröge
6be20ffb79 androidmedia: Move variables into the scope where they are needed 2015-06-15 14:22:00 +02:00
Sebastian Dröge
90c4a6ecd0 androidmedia: Don't query supported color formats for non-video codecs 2015-06-15 12:20:24 +02:00
Arun Raghavan
c7eb883e22 opensles: Fix build with Android API level < 14
Headers were broken on older Android versions, apparently.

https://bugzilla.gnome.org/show_bug.cgi?id=744459
2015-06-13 16:03:58 +05:30
Arun Raghavan
e3ed00e4eb openslessink: Allow setting the stream type via a property 2015-06-13 16:03:00 +05:30
Arun Raghavan
6b728f184f openslessrc: Implement recording presets
This allows us to signal what kind of audio we are expecting to record,
which should tell the system to apply filters (such as echo
cancellation, noise suppression, etc.) if required.
2015-06-13 16:03:00 +05:30
Sebastian Dröge
e3aaff400a decklinkvideosink: Remove late frame-dropping workaround for basesink bug
This was fixed by https://bugzilla.gnome.org/show_bug.cgi?id=749258
in basesink, and is not necessary to duplicate here anymore.
2015-06-13 11:41:33 +02:00
Sebastian Dröge
62f25894a5 decklinkvideosink: Don't require the same framerate in the input as the mode's framerate
We only really care about the timestamps for the sink.
2015-06-12 22:35:03 +02:00
Ilya Konstantinov
29c79d7595 vtenc: always enqueue frames, even on error
Even when we fail to encode frame, we should still enqueue it so
it could be passed into handle_frame (with output_buffer == NULL).
Otherwise, we risk GstVideoEncoder's queue of frames growing unbounded.

Note: We're slightly changing the renegotiation code to accommodate for
frames without output buffers, but this commit takes no ownership over
the way negotiation is being done.

https://bugzilla.gnome.org/show_bug.cgi?id=750669
2015-06-10 22:23:06 +02:00
Fabio Cetrini
79f57e62dc d3dvideosink: Avoid frame rendering while the window is completely hidden
https://bugzilla.gnome.org/show_bug.cgi?id=749856
2015-06-10 15:03:31 +02:00
Ilya Konstantinov
6101fc57b8 vtenc: free input buffer ASAP
VTCompressionSessionEncodeFrame retains the CVPixelBuffer during
encoding, and will release it as soon as it can (e.g. before it even
calls our callback). This means we can safely release input buffer
at this point, possibly allowing the system to reuse it sooner.

https://bugzilla.gnome.org/show_bug.cgi?id=750671
2015-06-10 10:30:23 +02:00
Ilya Konstantinov
f5c29c7379 vtenc: Add missing gst_vtenc_frame_free() in error path
https://bugzilla.gnome.org/show_bug.cgi?id=750668
2015-06-10 10:26:28 +02:00
Ilya Konstantinov
5db08a8b89 vtenc: add alignment=au to sink caps
VT compression callback gets a CMSampleBuffer per frame, so vtenc_h264
should set 'alignment=au' in sink caps to indicate this.

https://bugzilla.gnome.org/show_bug.cgi?id=750635
2015-06-10 10:20:44 +02:00
Chris Clayton
376d831178 uvch264src: fix compiler warnings
https://bugzilla.gnome.org/show_bug.cgi?id=750601
2015-06-09 18:30:55 +01:00
Ilya Konstantinov
05cc418ca2 avfassetsrc: fix huge memory leak
CMSampleBuffers were retained -> huge memory leak.

https://bugzilla.gnome.org/show_bug.cgi?id=750638
2015-06-09 16:36:41 +02:00
Ilya Konstantinov
faf903720a vtenc: no need for queue_length with try_pop 2015-06-09 16:20:06 +02:00
Ilya Konstantinov
1f7681dd0a vtdec: don't copy meta from input to output
Copying arbitrary metas is going to cause problems and this should really be
handled by the base class. It overrides most other things already anyway,
including timestamp and duration. Those are just set here now so we can
insert the frame sorted into the queue.

https://bugzilla.gnome.org/show_bug.cgi?id=748922
2015-06-09 16:20:06 +02:00
Thiago Santos
045bfa10fe Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2015-06-05 09:43:35 -03:00
Tim-Philipp Müller
96d1331679 ksvideosrc: fix logic and timestamp non-muxed streams again
https://bugzilla.gnome.org/show_bug.cgi?id=750381
2015-06-04 13:31:56 +01:00
Sebastian Dröge
d221108857 amc: Only lower ranks of OMX.Exynos. audio codecs, the video codecs are actually working 2015-06-01 20:03:22 +02:00
Sebastian Dröge
bf07b52477 amc: Give marginal rank to codecs that start with OMX.Exynos.
OMX.Exynos. codecs are existing on some devices like the
Galaxy S5 mini, and cause random crashes (of the device,
not the app!) and generally misbehave. That specific device
has other codecs that work with a different name, but let's
just give them marginal rank in case there are devices that
have no other codecs and these are actually the only working
ones
2015-06-01 19:41:21 +02:00
Sebastian Dröge
2e0395aa59 androidmedia: Give lower ranks to codecs not starting with OMX.
On some devices there are codecs that don't start with OMX., while
there are also some that do. And on some of these devices the ones
that don't start with OMX. just crash during initialization while
the others work. To make things even more complicated other devices
have codecs with the same name that work and no alternatives.
So just give a lower rank to these non-OMX codecs and hope that
there's an alternative with a higher rank.

Also stagefright gives codecs starting with OMX. a higher rank too and
considers other codecs that don't start with OMX. as software codecs.
2015-06-01 19:41:21 +02:00
Nicolas Dufresne
4cca6efda8 vtdec: Require width and height field for H264
This decoder does not work if width and height field are not set
in the sinkpad caps. Let's make this explicit by adding them to
the template caps.

https://bugzilla.gnome.org/show_bug.cgi?id=749655
2015-06-01 11:23:41 -04:00
Ilya Konstantinov
94e7ed1323 vtenc: fix keyframe request race condition
It is incorrect to modify the frame properties after passing them, since
VTCompressionSessionEncodeFrame takes reference and we have no control
over when it's being used.

In fact, the code can be simplified. We just preallocate the frame
properties for keyframe requests, and pass NULL otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=748467
2015-06-01 13:32:03 +02:00
Sebastian Dröge
a6fb482247 androidmedia: Conditionally use get_{input,output}_buffer() Android 21 APIs
Also properly set limit/position on byte buffer, some codecs prefer to have
correct values there.
2015-05-31 21:27:27 +02:00
Jan Schmidt
e7381ed17a wasapi: Fix flags order for uninstalled build 2015-05-21 13:42:29 +10:00
Sebastian Dröge
8bacecfb08 amcaudiodec: Add an output adapter for chunking the output into codec frames
Otherwise the base class will be confused.
See https://bugzilla.gnome.org/show_bug.cgi?id=685730
2015-05-19 19:12:41 +03:00
Ilya Konstantinov
c948484c7f avfvideosrc: fix unconditional buffer queue unlock
Unless stopRequest is set, we should unlock conditionally -- otherwise,
the 'create:' method can wake up to an empty buffer queue
and pull a nil buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=748054
2015-05-11 21:11:30 +10:00
Heinrich Fink
6007829e77 decklink: Rename mode 2048p to 1556p
https://bugzilla.gnome.org/show_bug.cgi?id=749218
2015-05-11 13:20:11 +03:00
Heinrich Fink
1dabd7c5b8 decklink: Use correct frame rate for mode 2160p50
https://bugzilla.gnome.org/show_bug.cgi?id=749218
2015-05-11 13:14:39 +03:00
Heinrich Fink
e6d82dec32 decklink: Rename mode 3184p to 2160p
https://bugzilla.gnome.org/show_bug.cgi?id=749218
2015-05-11 13:14:15 +03:00
Sebastian Dröge
7020154f1c vtdec: We shouldn't manually check reconfigure flag on pads but instead implement ::negotiate()
Add FIXME comment related to that.
2015-05-08 15:08:18 +02:00
Matthieu Bouron
3c77fbda87 androidmedia: Add suport for COLOR_FormatYV12
Reference: http://developer.android.com/reference/android/graphics/ImageFormat.html#YV12

https://bugzilla.gnome.org/show_bug.cgi?id=747126
2015-05-04 12:45:12 +02:00
Matthieu Bouron
bd21df1056 androidmedia: Declare QOMX_COLOR_FORMATYVU420PackedSemiPlanar32mMultiView constant
This color format is the same as QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m
but stores two images one after the other in a top-bottom layout.

https://bugzilla.gnome.org/show_bug.cgi?id=747126
2015-05-04 12:44:56 +02:00
Matthieu Bouron
21ff3ae0b0 androidmedia: Fix slice-height for Tegra 3 devices
https://bugzilla.gnome.org/show_bug.cgi?id=748867
2015-05-04 10:39:38 +02:00
Edward Hervey
8d41c3e393 androidmedia: Add support for COLOR_FormatYUV420Flexible
https://bugzilla.gnome.org/show_bug.cgi?id=747126
2015-05-04 09:34:29 +02:00
Edward Hervey
0654442c8f androidmedia: Add suport for Intel color formats
https://bugzilla.gnome.org/show_bug.cgi?id=747126
2015-05-04 09:34:15 +02:00
Andoni Morales Alastruey
1991b5bb6f ksvideosrc: don't timestamp buffers for muxed streams 2015-04-29 21:41:55 +02:00
Andoni Morales Alastruey
20e5a4a498 ksvideosrc: fix header size for muxed streams 2015-04-29 21:41:48 +02:00
Руслан Ижбулатов
a31855d618 GstDeviceProvider implementation for WIN Kernel Streaming plugin
gst_ks_device_provider_probe() is a no-braier, just runs ks_enumerate_devices()
and reports the results.

Monitoring is a bit more tricky. We have to create a dummy message-processing
window and register device change notifications for it.

As kernel streaming can (and should) be used for audio capture and audio
playback, this change also has certain placeholders for such.

https://bugzilla.gnome.org/show_bug.cgi?id=747757
2015-04-28 20:24:26 -04:00
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
Tim-Philipp Müller
699452ef31 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:59:32 +01:00
Yujin Lee
a8ea7a9cfb vtdec: fix build error with clang
This commit fixes a simple build error by clang with
by clang with [-Werror,-Wtautological-pointer-compare] options.

https://bugzilla.gnome.org/show_bug.cgi?id=748110
2015-04-26 19:23:06 +02:00
Josep Torra
cf66541850 decklinkvideosrc: fix mode autodetection
The autodetection mode was broken because a race condition in the input mode
setting. The mode could be reverted back when it was replaced in
the streaming thread by the old mode in the middle of mode changed callback.
2015-04-22 17:20:22 +02:00
Josep Torra
6b70b848ee decklink: do not repeat first video format in caps template
The first entry in the modes array is used as default mode for autodetection.
There's no need to copy it into the caps template.
2015-04-22 17:20:21 +02:00
Edward Hervey
af49c109e4 shmpipe: Ensure string received from recv() is NULL-terminated
We will be doing string operations on it later.

CID #1292830
2015-04-20 14:21:09 +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
c98eb6f2f5 corevideotexturecache: free texture cache on iOS
https://bugzilla.gnome.org/show_bug.cgi?id=748122
2015-04-19 14:48:43 +02: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
Sebastian Dröge
774866ad62 androidmedia: Handle queue/release errors non-fatal
They can happen sometimes as a transient problem, e.g. if there
is a problem in the stream. Only handle them as fatal if many of
them happen in a row.
2015-04-17 20:11:46 +02:00