Commit graph

120 commits

Author SHA1 Message Date
Nirbheek Chauhan
8865b440d9 decklink: Fix linking on MinGW
MinGW does not provide comsupp.lib, so there's no implementation of
_com_util::ConvertBSTRToString. Use a fallback implementation that
uses wcstombs() instead.

On MinGW we also truncate the name to 100 chars which should be fine.
2017-05-05 17:49:22 +05:30
Nirbheek Chauhan
845832263b decklink: Fix debug logging warnings on Windows
HRESULT is unsigned long int, not unsigned int
2017-05-05 17:49:22 +05:30
Sebastian Dröge
4cdd234add decklink: Fix indentation 2017-01-31 14:56:34 +02:00
Sebastian Dröge
861cb49895 decklink: Fix compilation on Windows by properly using COM strings there 2017-01-31 14:56:34 +02:00
Axel Menzel
f784fda162 decklink: Fix compilation with MSVC 2017-01-31 14:56:34 +02:00
Vivia Nikolaidou
f23277e55d decklinkaudiosrc: Option to use max channels supported by device
Query the device for the maximum number of channels supported and have
an option to use that. Default is still 2.

https://bugzilla.gnome.org/show_bug.cgi?id=777458
2017-01-26 16:18:57 +02:00
Sebastian Dröge
d6b75e5233 decklink: Fix compiler warning with clang
gstdecklink.cpp:821:11: warning: variable 'dtc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
      if (m_input->videosrc) {
          ^~~~~~~~~~~~~~~~~
gstdecklink.cpp:837:41: note: uninitialized use occurs here
          stream_time, stream_duration, dtc, no_signal);
                                        ^~~
gstdecklink.cpp:821:7: note: remove the 'if' if its condition is always true
      if (m_input->videosrc) {
      ^~~~~~~~~~~~~~~~~~~~~~~
gstdecklink.cpp:810:29: note: initialize the variable 'dtc' to silence this warning
      IDeckLinkTimecode *dtc;
                            ^
                             = NULL
2017-01-25 20:48:58 +02:00
Vivia Nikolaidou
3cb43f35b8 decklinkvideosrc: Do not append a zero timecode if none is found on the source
If the source doesn't give us timecode information, do not append a zero
timecode to the frames.

https://bugzilla.gnome.org/show_bug.cgi?id=776900
2017-01-09 18:37:50 +02:00
Sebastian Dröge
e31714691a decklink: Fix indentation 2017-01-03 17:31:03 +02:00
Sebastian Dröge
e8e531ee12 decklinkaudiosrc: Add support for 8/16 channels via property
These are unpositioned channel layouts.
2017-01-03 17:30:07 +02:00
Sebastian Dröge
5725bad218 decklink: Fix compiler warning
gstdecklink.cpp: In member function ‘virtual HRESULT GStreamerDecklinkInputCallback::VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*)’:
gstdecklink.cpp:766:34: error: ‘base_time’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         capture_time -= base_time;
                                  ^
2016-11-29 15:35:09 +02:00
Sebastian Dröge
fdf1a57953 decklink: Correctly set top-field-first/bottom-field-first
First of all, all the HD and UHD modes should be top-field-first, as
also returned by the Decklink mode iterator API.

Then we should include the caps field "field-order" in the caps of the
source (not the sink due to negotiation problems with optional fields).

And finally we should set the TFF flag on interlaced buffers that are
top-field-first.
2016-11-28 17:19:26 +02:00
Sebastian Dröge
cf224a9990 decklinksrc: Set GAP flag on buffers that are captured without signal
https://bugzilla.gnome.org/show_bug.cgi?id=774850
2016-11-28 14:27:51 +02:00
Sebastian Dröge
881a08671e decklinksrc: Stop using the "hardware" timestamps and directly use the pipeline clock
The hardware timestamps have no relation to when frames were produced,
only when frames arrived somewhere in the hardware. Especially there is
no guarantee that audio and video will have the same hardware timestamps
although they belong together, and even more important: the rate with
which the hardware timestamps increase is completely unrelated to the
rate with which the frames are captured!

As such we can as well use the pipeline clock directly and stop doing
complicated calculations. Also as a side effect this allows now running
without any pipeline clock, by directly making use of the stream times
as reported by the driver.

https://bugzilla.gnome.org/show_bug.cgi?id=774850
2016-11-28 14:27:51 +02:00
Sebastian Dröge
f9a8b843df decklink: Print the Decklink API error return values in debug output in all places 2016-09-21 09:31:41 -04:00
Sebastian Dröge
6fdd4d8288 decklinkaudiosink: Add support for 8 and 16 channels 2016-08-26 15:49:40 +03:00
Vivia Nikolaidou
8faa36e105 decklinkvideosrc: Add support for GstVideoTimeCode
The timecode will be fetched from the decklink source and attached to the
video buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 19:08:27 +03:00
Vivia Nikolaidou
a4ae449434 decklink: Fix swapped name and nick in GEnumValues
https://bugzilla.gnome.org/show_bug.cgi?id=742878
2016-05-03 15:57:23 +03:00
Vivia Nikolaidou
832764d2fd decklink: Add initial 10bit support for YUV modes
https://bugzilla.gnome.org/show_bug.cgi?id=742878
2016-05-03 15:57:23 +03:00
Sebastian Dröge
87503ac174 decklink: Fix indentation 2016-05-03 15:57:23 +03:00
Sebastian Dröge
da999d7af8 decklink: Initialize capture_time to NONE so it can be used if no video frame is provided but audio is
CID 1358390
2016-04-08 14:08:31 +03:00
Sebastian Dröge
0004920c83 decklinkaudiosrc: Don't crash when receiving video frames but no audio
And mark these events as disconts to reset time tracking in the audio source.

https://bugzilla.gnome.org/show_bug.cgi?id=747633
2016-04-05 14:47:00 +03:00
Tim-Philipp Müller
8abff20185 decklinkvideosrc: don't crash if we get NULL video frames in the callback
For some reason we seem to sometimes get NULL video_frames in the
::VideoInputFrameArrived() callback, observed on Intensity Pro cards.

https://bugzilla.gnome.org/show_bug.cgi?id=747633
2016-04-05 14:46:22 +03: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
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
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
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
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
DanielD10
034ed48023 decklink: Incorrect frame rate for interlaced modes
https://bugzilla.gnome.org/show_bug.cgi?id=744386
2015-03-02 11:59:31 +01:00
Sebastian Dröge
b739cf8b7f decklink: Fix compiler warning with gcc
gstdecklink.cpp: In member function 'virtual HRESULT GStreamerDecklinkInputCallback::VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*)':
gstdecklink.cpp:498:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (capture_time > m_input->clock_start_time)
                      ^
gstdecklink.cpp:503:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (capture_time > m_input->clock_offset)
                      ^
2015-02-09 21:04:17 +01:00
Sebastian Dröge
f0e85023c2 decklink{audio,video}src: Implement clock slaving if the pipeline clock is not the decklink clock 2015-02-09 17:17:37 +01:00
Sebastian Dröge
22b0a4dad5 decklink{audio,video}src: Take the capture times from the pipeline clock
Not from the decklink clock. Both will return exactly the same time once the
decklink clock got slaved to the pipeline clock and received the first
observation, but until then it will return bogus values. But as both return
exactly the same values, we can as well use the pipeline clock directly.
2015-02-08 21:56:04 +01:00
Sebastian Dröge
00176a1ddf decklink: Make sure our clock never returns NONE, always advances and does not jump when going from PAUSED to PLAYING
It basically behaves the same as the audio clocks.
2015-01-28 16:13:16 +01:00
Sebastian Dröge
ab9ee34aba decklink: Use BT2020 colorspace for UltraHD resolutions 2015-01-13 19:56:45 +01:00
Sebastian Dröge
65119ae8b4 decklink: Fix indention once again 2015-01-13 19:56:45 +01:00
Sebastian Dröge
b79ece392c decklink: Initialize refcount of our C++ classes in the constructor
CID 1262288
CID 1262287
CID 1262289
2015-01-12 15:58:38 +01:00
Florian Langlois
9480d91ad4 decklinkvideosrc: Add automatic mode detection
https://bugzilla.gnome.org/show_bug.cgi?id=739284
2015-01-08 18:16:12 +01:00
Sebastian Dröge
7e7cabb422 decklink: Add a dummy value to the video connection mapping table for auto 2015-01-08 12:55:51 +01:00
Sebastian Dröge
34de6ad73b decklink: Add XLR and RCA audio connection enums 2015-01-08 12:23:53 +01:00
Sebastian Dröge
a35d5ae9b9 decklinkvideosrc: Add auto value for the connection property
This will use the default/auto connection for video capturing, and can
be set via the Decklink configuration tools.
2015-01-08 12:23:09 +01:00
Florian Langlois
81c1ef190d decklink: Add property for configuring the input connection of the video sources 2015-01-08 12:12:50 +01:00
Sebastian Dröge
196d9c4829 decklink: Add support for 4K / UHD modes 2014-12-29 17:58:37 +01:00
Sebastian Dröge
0122a9d1b6 decklink: Fix indention 2014-12-29 17:58:37 +01:00
Sebastian Dröge
d632a48d6c decklink: Fix various compiler warnings with gcc 2014-12-19 15:05:58 +01:00
Sebastian Dröge
5e7782ca39 decklink: Re-add the COM initialization code for Windows
Untested, and we will never deinitialize COM again.
2014-12-19 14:50:25 +01:00
Sebastian Dröge
6d931a0c0e decklink: Add initial version of audio and video sources 2014-12-19 14:40:39 +01:00
Sebastian Dröge
57d46fe9e1 decklink: Initial version of the audio/video sink rewrite 2014-12-19 14:40:39 +01:00
Sebastian Dröge
11485e32ab decklink: Add support for 2k modes 2014-11-24 14:11:04 +01:00
Sebastian Dröge
104f39dfe8 decklink: HD1080i50 is 50 frames per second 2014-11-24 13:56:56 +01:00
Sebastian Dröge
bdfac8a6d4 decklink: Fix indention 2014-11-14 10:41:59 +01:00
Sebastian Dröge
a8f94fe1e1 decklink: 59.94fps is 60000/1001, not 30000/1001
And also change 30/1 to 60/1 for one 60fps mode.
2014-08-01 12:39:47 +02:00
Nicolas Dufresne
4e9036690c decklink: Don't fail if HW does not have all interfaces
This patch completes 1c1cc73a3b. These
changes where accidentally pushed as a separate patch with wrong commit
message.

https://bugzilla.gnome.org/show_bug.cgi?id=7273
2014-04-27 09:34:39 -04:00
Tim-Philipp Müller
d5a0ace347 Revert "y4mdec: check for VIDEO meta instead of CROP meta"
This reverts commit 68309bd215.

Commit message and files changed do not match.
2014-04-27 13:11:03 +01:00
Nicolas Dufresne
1c1cc73a3b decklink: Fix support for HW without output
Devices suitable for decklinksrc may not have any output, hence querying
the input returns NULL. Add support for all cases where
input/output/config may be missing.

https://bugzilla.gnome.org/show_bug.cgi?id=727306
2014-04-23 12:42:44 -04:00
Nicolas Dufresne
68309bd215 y4mdec: check for VIDEO meta instead of CROP meta
This element only need stride support, but checks for CROP_META, which
is a bit too much, even though this works as CROP imply having VIDEO
meta.

https://bugzilla.gnome.org/show_bug.cgi?id=726255
2014-04-23 12:42:44 -04:00
Youri Westerman
136aa4614e decklink: actually enable decklinksink
https://bugzilla.gnome.org/show_bug.cgi?id=704505
2013-07-22 14:29:35 +01:00
Tim-Philipp Müller
126df5a0c2 decklinksrc: port to 1.0
Compiles, not tested yet. A great number of superfluous custom
pad functions may have been harmed in the making of this port.
2013-02-27 23:34:34 +00:00
David Schleef
65a1f79bcb decklink: change device instance lifecycle
The decklink driver eventually crashes after repeated creation/deletion
of device, input, output, and configuration objects.  Change to create
these at the outset and keep them around forever.
2012-09-23 21:27:36 +01:00
David Schleef
70cef922a4 decklink: use GOnce in type registration 2012-07-03 09:09:18 +02:00
Sebastian Dröge
cda192b3b7 gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 18:02:56 +02:00
David Schleef
aca69cbf63 decklinksink: Add device property
Also add property probe for device property, similar to decklinksrc.
2012-03-17 15:07:49 -07:00
David Schleef
83e2ca791c decklink: reindent 2012-03-17 14:24:51 -07:00
David Schleef
2b5e8db968 decklink: Add audio-input property 2011-08-03 13:39:33 -07:00
David Schleef
5056c34761 decklink: HD modes are square pixels 2011-07-07 11:29:37 -07:00
David Schleef
ae49fa1f78 decklink: Add more modes 2011-07-04 16:48:59 -07:00
David Schleef
16a49a3617 decklink: Add connection type 2011-06-20 12:49:16 -07:00
David Schleef
1faf410ca3 decklink: Add various features
Better mode support, input source property, audio support.
2011-06-20 12:49:16 -07:00
David Schleef
8961f6a900 decklink: Add decklink plugin
Source and sink elements for BlackMagic DeckLink SDI cards.
2011-03-23 21:33:49 -07:00