mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
decklink: Fix indentation
This commit is contained in:
parent
344e7db975
commit
87503ac174
2 changed files with 29 additions and 19 deletions
|
@ -323,7 +323,8 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f)
|
||||||
"width", G_TYPE_INT, mode->width,
|
"width", G_TYPE_INT, mode->width,
|
||||||
"height", G_TYPE_INT, mode->height,
|
"height", G_TYPE_INT, mode->height,
|
||||||
"pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
|
||||||
"interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
|
"interlace-mode", G_TYPE_STRING,
|
||||||
|
mode->interlaced ? "interleaved" : "progressive",
|
||||||
"framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
|
"framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
|
||||||
|
|
||||||
switch (f) {
|
switch (f) {
|
||||||
|
@ -376,9 +377,11 @@ gst_decklink_mode_get_template_caps (void)
|
||||||
|
|
||||||
caps = gst_caps_new_empty ();
|
caps = gst_caps_new_empty ();
|
||||||
for (i = 1; i < (int) G_N_ELEMENTS (modes); i++) {
|
for (i = 1; i < (int) G_N_ELEMENTS (modes); i++) {
|
||||||
s = gst_decklink_mode_get_structure ((GstDecklinkModeEnum) i, bmdFormat8BitYUV);
|
s = gst_decklink_mode_get_structure ((GstDecklinkModeEnum) i,
|
||||||
|
bmdFormat8BitYUV);
|
||||||
gst_caps_append_structure (caps, s);
|
gst_caps_append_structure (caps, s);
|
||||||
s = gst_decklink_mode_get_structure ((GstDecklinkModeEnum) i, bmdFormat8BitARGB);
|
s = gst_decklink_mode_get_structure ((GstDecklinkModeEnum) i,
|
||||||
|
bmdFormat8BitARGB);
|
||||||
gst_caps_append_structure (caps, s);
|
gst_caps_append_structure (caps, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +395,8 @@ gst_decklink_find_mode_for_caps (GstCaps * caps)
|
||||||
GstCaps *mode_caps;
|
GstCaps *mode_caps;
|
||||||
|
|
||||||
for (i = 1; i < (int) G_N_ELEMENTS (modes); i++) {
|
for (i = 1; i < (int) G_N_ELEMENTS (modes); i++) {
|
||||||
mode_caps = gst_decklink_mode_get_caps ((GstDecklinkModeEnum) i, bmdFormat8BitYUV);
|
mode_caps =
|
||||||
|
gst_decklink_mode_get_caps ((GstDecklinkModeEnum) i, bmdFormat8BitYUV);
|
||||||
if (gst_caps_can_intersect (caps, mode_caps)) {
|
if (gst_caps_can_intersect (caps, mode_caps)) {
|
||||||
gst_caps_unref (mode_caps);
|
gst_caps_unref (mode_caps);
|
||||||
return gst_decklink_get_mode ((GstDecklinkModeEnum) i);
|
return gst_decklink_get_mode ((GstDecklinkModeEnum) i);
|
||||||
|
@ -530,9 +534,11 @@ public:
|
||||||
IDeckLinkVideoInputFrame * frame, GstDecklinkModeEnum mode,
|
IDeckLinkVideoInputFrame * frame, GstDecklinkModeEnum mode,
|
||||||
GstClockTime capture_time, GstClockTime capture_duration) = NULL;
|
GstClockTime capture_time, GstClockTime capture_duration) = NULL;
|
||||||
void (*got_audio_packet) (GstElement * videosrc,
|
void (*got_audio_packet) (GstElement * videosrc,
|
||||||
IDeckLinkAudioInputPacket * packet, GstClockTime capture_time, gboolean discont) = NULL;
|
IDeckLinkAudioInputPacket * packet, GstClockTime capture_time,
|
||||||
|
gboolean discont) = NULL;
|
||||||
GstDecklinkModeEnum mode;
|
GstDecklinkModeEnum mode;
|
||||||
BMDTimeValue capture_time = GST_CLOCK_TIME_NONE, capture_duration = GST_CLOCK_TIME_NONE;
|
BMDTimeValue capture_time = GST_CLOCK_TIME_NONE, capture_duration =
|
||||||
|
GST_CLOCK_TIME_NONE;
|
||||||
HRESULT res;
|
HRESULT res;
|
||||||
|
|
||||||
if (video_frame == NULL)
|
if (video_frame == NULL)
|
||||||
|
@ -576,14 +582,16 @@ public:
|
||||||
capture_duration);
|
capture_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
no_video_frame:
|
no_video_frame:
|
||||||
if (got_audio_packet && audiosrc && audio_packet) {
|
if (got_audio_packet && audiosrc && audio_packet) {
|
||||||
m_input->got_audio_packet (audiosrc, audio_packet, capture_time, m_input->audio_discont);
|
m_input->got_audio_packet (audiosrc, audio_packet, capture_time,
|
||||||
|
m_input->audio_discont);
|
||||||
m_input->audio_discont = FALSE;
|
m_input->audio_discont = FALSE;
|
||||||
} else {
|
} else {
|
||||||
m_input->audio_discont = TRUE;
|
m_input->audio_discont = TRUE;
|
||||||
if (!audio_packet)
|
if (!audio_packet)
|
||||||
GST_DEBUG ("Received no audio packet at %" GST_TIME_FORMAT, GST_TIME_ARGS (capture_time));
|
GST_DEBUG ("Received no audio packet at %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (capture_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_object_replace ((GstObject **) & videosrc, NULL);
|
gst_object_replace ((GstObject **) & videosrc, NULL);
|
||||||
|
|
|
@ -491,8 +491,10 @@ retry:
|
||||||
sample_count = p->packet->GetSampleFrameCount ();
|
sample_count = p->packet->GetSampleFrameCount ();
|
||||||
data_size = self->info.bpf * sample_count;
|
data_size = self->info.bpf * sample_count;
|
||||||
|
|
||||||
if (p->capture_time == GST_CLOCK_TIME_NONE && self->next_offset == (guint64) - 1) {
|
if (p->capture_time == GST_CLOCK_TIME_NONE
|
||||||
GST_DEBUG_OBJECT (self, "Got packet without timestamp before initial "
|
&& self->next_offset == (guint64) - 1) {
|
||||||
|
GST_DEBUG_OBJECT (self,
|
||||||
|
"Got packet without timestamp before initial "
|
||||||
"timestamp after discont - dropping");
|
"timestamp after discont - dropping");
|
||||||
capture_packet_free (p);
|
capture_packet_free (p);
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|
Loading…
Reference in a new issue