Commit graph

3099 commits

Author SHA1 Message Date
Joshua M. Doe
73a84148d3 dshowvideosrc: delay selecting device until source is started
The previous behaviour had issues when setting one of the device properties
after _get_caps had been called. The device shouldn't be locked in until after
_start has been called.
2018-11-09 09:52:40 +00:00
Joshua M. Doe
4b4535b35c dshowvideosrc: fix template caps to reflect actual supported caps 2018-11-09 09:52:40 +00:00
Joshua M. Doe
659e5d08ac dshowsrcwrapper: add some helpful debug statements 2018-11-09 09:52:40 +00:00
Joshua M. Doe
1449411e39 ksvideosrc: initialize pointer to satisfy MSVC 2018-11-08 15:42:51 +00:00
Joshua M. Doe
ca90ecef9c ksvideosrc: support 'Y16 ' FOURCC as GRAY16_LE
The FLIR Boson USB provides 16-bit grayscale video using this FOURCC.
2018-11-08 15:42:51 +00:00
Joshua M. Doe
6c53d696dd ksvideosrc: gracefully handle device prop when empty string 2018-11-08 15:42:51 +00:00
Sebastian Dröge
2d0243fc68 decklinkvideosrc: Search from line 1 again if we didn't find closed captions at the same line as before 2018-11-07 16:07:25 +00:00
Jordan Petridis
1e887f9b12
meson: avoid unkown variables in the msdk tests 2018-11-06 23:48:58 +02:00
admin
8af8fd62dd decklinkvideosink: fix segfault when audiosink is closed before videosink 2018-11-06 17:19:16 +00:00
Florent Thiéry
23b0172ee9 msdk: fix intel sdk libdir path
the 2018.3.1 intel sdk release places libraries into /lib64 instead of
/lib/lin_x64 or /lib/x64, this commit adds /lib64 to the libdir
locations list

Fixes #815
2018-11-06 13:08:45 +00:00
Seungha Yang
f4dc780168 d3dvideosink: Fix calculating buffer size of packed format
The Pitch (i.e., stride) of D3DLOCKED_RECT structure is already
respecting required stride value.
2018-11-06 11:51:39 +00:00
Seungha Yang
6c6d351665 d3dvideosink: Set actual buffer size to buffer pool
If configured size of buffer pool and actual buffer size are mismatched,
pool will do unwanted buffer resize.

Fixes #801
2018-11-06 11:51:39 +00:00
Seungha Yang
dee5201392 d3dvideosink: Use lock/cond to wait internal window construction
We can save one (or possibly more) sleep time by using lock/cond
2018-11-06 11:51:39 +00:00
Seungha Yang
b3279c3fce d3dvideosink: Don't leak GThread object
Need to call g_thread_join() to avoid leak
2018-11-06 11:51:39 +00:00
Seungha Yang
c9b204ea87 d3dvideosink: Print lock/unlock log with trace debug level 2018-11-06 11:51:39 +00:00
Seungha Yang
2a3207bfc1 d3dvideosink: Remove white space 2018-11-06 11:51:39 +00:00
Matthew Waters
dff857463a applemedia: install plugin pkg-config file 2018-11-06 14:35:46 +11:00
Joshua M. Doe
1a360a1c65 decklinkvideosrc: respect pixel format property even if mode is set to auto
Before this patch, if mode=auto and video-format!=auto, video-format would
always be ignored, and get set to 8bit-yuv, or if detected to be RGB444, then
it would be set to 8bit-argb. This change respects video-format if it is set
to 10bit-yuv (v210) or 8bit-bgra, even when mode=auto.

Closes #772
2018-11-05 08:52:11 -05:00
Sebastian Dröge
3d8a0b8996 decklinkvideosrc: Add support for extracing CEA608 according to S334-1 Annex A
https://bugzilla.gnome.org/show_bug.cgi?id=797363
2018-11-01 19:21:47 +02:00
Nirbheek Chauhan
55134df54c meson: Add a feature option for the MSDK plugin 2018-10-28 14:54:52 +00:00
Joshua M. Doe
6c7ba14247 dshowsrcwrapper: add device-index property to sources
This allows users to more easily select different devices without having
to first get the device or device-name.

https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01:00
Joshua M. Doe
5caefc1e0c dshowsrcwrapper: update CMake build instructions
GStreamer 1.8 is minimum version, and remove paragraph about 32 vs 64-bit build

https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01:00
Joshua M. Doe
a6d193bb1e dshowsrcwrapper: support building 32- and 64-bit with CMake
https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01:00
Joshua M. Doe
1569264d1e dshowsrcwrapper: add debug category for general dshowsrcwrapper
https://bugzilla.gnome.org/show_bug.cgi?id=797338
2018-10-27 21:58:30 +01:00
Josep Torra
498dc9a84d shmsrc: delay fd removal until there's no uses
This fixes the remaining race condition with the fd by delaying
the removal until last pipe ref.

Unexpected critical/warning: gst_poll_fd_has_error: assertion 'fd->fd
>= 0' failed

Stack trace:
gst_debug_get_stack_trace (gstinfo.c:2788)
gst_check_log_critical_func (gstcheck.c:281)
g_logv (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2:0x7fdd4efa0a40)
g_log (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2:0x7fdd4efa0c6b)
gst_poll_fd_has_error (gstpoll.c:1217)
gst_shm_src_create (gstshmsrc.c:364)
gst_push_src_create (gstpushsrc.c:131)
gst_base_src_get_range (gstbasesrc.c:2521)
gst_base_src_loop (gstbasesrc.c:2845)
gst_task_func (gsttask.c:328)
default_func (gsttaskpool.c:69)

https://bugzilla.gnome.org/show_bug.cgi?id=797203
2018-10-10 13:42:05 -04:00
Josep Torra
eb1665ff22 shmsrc: fixes a crash when is-live is true due a race condition
There's a race condition when is-live is set to true and the shmsrc
element releases the pipe in the transition from PLAYING to PAUSED.
To avoid it this change ensures that _create method takes the pipe
and increases the use_count in one operation protected by object lock.
Also perform apropriate protections when releasing the pipe.

https://bugzilla.gnome.org/show_bug.cgi?id=797203
2018-10-10 13:42:05 -04:00
Olivier Crête
a3f395d921 shmsrc: Remove commented out code 2018-10-10 13:07:50 -04:00
Aleix Conchillo Flaqué
5078116889 shmsink: do not keep locking if element is unlocked
https://bugzilla.gnome.org/show_bug.cgi?id=797260
2018-10-10 12:02:44 -04:00
Seungha Yang
f106a10994 msdk: Fix building on MSVC
And add missing #ifdef _WIN32 for MSVC build

https://bugzilla.gnome.org/show_bug.cgi?id=797211
2018-10-02 04:04:24 +05:30
Seungha Yang
44ecf53d1c msdk: Fix meson build
gst-plugins-bad\sys\msdk\meson.build:57:4: ERROR:  File msdk-enum.c does not exist.

https://bugzilla.gnome.org/show_bug.cgi?id=797211
2018-10-02 04:04:24 +05:30
Matthew Waters
17f0271aa0 decklinkvideosink: fix build
../sys/decklink/gstdecklinkvideosink.cpp:1006:11: error: ‘GstDecklinkVideoSink {aka struct _GstDecklinkVideoSink}’ has no member named ‘scheduled_stop_time’
     self->scheduled_stop_time = start_time;
           ^
2018-09-12 22:38:56 +10:00
Matthew Waters
946cbbccc1 decklink: wait for stop with a timeout
Decklink sometimes does not notify us through the callback that it has
stopped scheduled playback either because it was uncleanly shutdown
without an explicit stop or for unknown other reasons.

Wait on the cond for a short amount of time before checking if scheduled
playback has stopped without notification.

https://bugzilla.gnome.org/show_bug.cgi?id=797130
2018-09-12 21:17:13 +10:00
Matthew Waters
bf849e9a69 decklink: start scheduled playback in paused
This is part of a much larger goal to always keep the frames we schedule to
decklink be always increasing.  This also allows us to avoid using both the
sync and async frame display functions which aren't recomended to be used
together.

If the output timestatmsp is not always increasing decklink seems to hold
onto the latest frame and may cause a flash in the output if the played
sequence has a framerate less than the video output.

Scenario is play for N seconds, pause, flushing seek to some other position,
play again.  Each of the play sequences would normally start at 0 with
the decklink time.  As a result, the latest frame from the previous sequence
is kept alive waiting for it's timestamp to pass before either dropping
(if a subsequent frame in the new sequence overrides it) or displayed
causing the out of place frame to be displayed.

This is also supported by the debug logs from the decklink video sink
element where a ScheduledFrameCompleted() callback would not occur for
the frame until the above had happened.

It was timing related as to whether the frame was displayed based
on the decklink refresh cycle (which seems to be 16ms here),
when the frame was scheduled by the sink and the difference between
the 'time since vblank' of the two play requests (and thus start times
of scheduled playback).

https://bugzilla.gnome.org/show_bug.cgi?id=797130
2018-09-12 21:16:27 +10:00
Matthew Waters
87077d20de decklinkaudiosink: fix debug string copy-paste error
Stopping != Starting
2018-09-12 20:37:47 +10:00
Nirbheek Chauhan
f62b7fd712 wasapi: Remove code that sets thread priority
This is now handled directly in gstaudiosrc/sink, and we were setting
it in the wrong thread anyway. prepare() is not the same thread as
sink_write() or src_read().
2018-09-11 01:00:21 +05:30
Nirbheek Chauhan
0146ad219e meson: Fix applemedia dependencies on iOS
These were accidentally not being found because they were incorrectly
specified.
2018-09-01 21:48:54 +05:30
Matthew Waters
7dc7607475 androidmedia/meson: we also depend on gmodule and orc 2018-08-31 18:08:55 +10:00
Devarsh Thakkar
7d79378895 kmssink: Add "restore-crtc" property
This adds "restore-crtc" property using which one
can restore previous crtc mode.

By default it is enabled, if CRTC was already
active with a valid mode and kmssink set a new mode
on CRTC using force-modesetting.

This helps user restore previous crtc mode and get
the previous session back after running a kmssink
pipeline involving a force-modesetting.

For e.g. When running a kmssink pipeline on rpi
using force-modesetting on tty console, it was giving
a blank screen after pipeline, and now with help of restore-crtc
functionality, CRTC is set with previous crtc mode
previously active on tty console.

Edited-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=797025
2018-08-29 14:17:51 -04:00
Nicolas Dufresne
531709e5bf kmssink: Document possible advance usage
This adds a mention about modetest command line tool and adds an example
on how to use the connector/plane-properties.

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 12:03:52 -04:00
Nicolas Dufresne
2f30287b5f kmssink: Escape DRM property names
This allow setting properties that contains spaces. The spaces are
replaced with '-'. As an example, one can set the connector proper
"scaling mode" with the following:

  ... ! kmssink connector-properties="s,scaling-mode=1"

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 12:03:52 -04:00
Nicolas Dufresne
63dca26fac kmssink: Add 'plane-properties' property
This is similar to 'connector-properties' but will change
selected plane properties instead.

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:57:39 -04:00
Nicolas Dufresne
203b41b510 kmssink: Generalize setting DRM object properties
https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:57:37 -04:00
Guillaume Desmottes
71ab97cba6 kmssink: add 'connector-properties' prop
Can be used to pass custom connector properties to DRM. Properties can
be enumerated using modetest tool. These properties can then be applied
with the following gst-launch-1.0 syntax. Note that the name of the
structure is ignored.

  ... ! kmssink connector-properties="s,props1=value,props2=value"

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:55:19 -04:00
Nirbheek Chauhan
4af7637012 meson: Add build files for androidmedia and opensles
Note that androidmedia requires Android gstgl
2018-08-29 14:58:19 +05:30
Vivia Nikolaidou
4ca76e0c12 decklink: Only use drop-frame flag for 29.97 and 59.94 FPS
Otherwise it can cause errors in gstvideotimecode.c because drop-frame
is not defined for any other frame rate (e.g. 24000/101)

https://blog.frame.io/2017/07/17/timecode-and-frame-rates/

https://bugzilla.gnome.org/show_bug.cgi?id=797037
2018-08-28 15:23:48 +03:00
Philipp Zabel
62a194c781 kmssink: configure mode setting from video info
drmModeGetFB returns -EINVAL for multi-planar framebuffers. Instead of
depending on the framebuffer dimensions to select the mode, use width
and height from GstVideoInfo, which was used to create the framebuffer
in the first place.  This enables kmssink to display multi-planar
formats such as I420 or NV12 with modesetting enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=796985
2018-08-21 11:49:55 -04:00
Jerome Laheurte
203d1825c5 ksvideosrc: fix device enumeration when hotplugging a camera
Since both audio and video capture devices declare the KSCATEGORY_CAPTURE interface,
plugging a camera that supports both could result in an audio device being mistaken
for a video one.

https://bugzilla.gnome.org/show_bug.cgi?id=796958
2018-08-19 16:58:22 -04:00
Nirbheek Chauhan
5177f7c7ee meson: host_system is 'ios' when building for iOS
The cross file sets this value, and we use 'ios' in Cerbero.
2018-08-17 04:07:24 +05:30
Nirbheek Chauhan
2a452f2a5d meson: Fix shm librt dep check on macOS, iOS, and *BSD 2018-08-15 19:34:56 +05:30
Nirbheek Chauhan
a93bb626c9 meson: Add an option for the applemedia plugin 2018-08-14 19:48:28 +05:30