mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
video: Update for libgstvideo API changes
This commit is contained in:
parent
f1ec8fcb05
commit
7ff3293a44
5 changed files with 8 additions and 18 deletions
|
@ -2028,10 +2028,7 @@ gst_base_video_decoder_set_src_caps (GstBaseVideoDecoder * base_video_decoder)
|
|||
info->fps_d = state->fps_d;
|
||||
|
||||
if (state->have_interlaced) {
|
||||
if (state->interlaced)
|
||||
GST_VIDEO_INFO_FLAG_SET (info, GST_VIDEO_FLAG_INTERLACED);
|
||||
if (state->top_field_first)
|
||||
GST_VIDEO_INFO_FLAG_SET (info, GST_VIDEO_FLAG_TFF);
|
||||
info->interlace_mode = GST_VIDEO_INTERLACE_MODE_INTERLEAVED;
|
||||
}
|
||||
|
||||
/* FIXME : Handle chroma site */
|
||||
|
|
|
@ -351,9 +351,7 @@ gst_base_video_encoder_sink_setcaps (GstBaseVideoEncoder * base_video_encoder,
|
|||
/* FIXME (Edward): We need flags in GstVideoInfo to know whether
|
||||
* interlaced field was present in input caps */
|
||||
tmp_state.have_interlaced = tmp_state.interlaced =
|
||||
GST_VIDEO_INFO_FLAG_IS_SET (&tmp_info, GST_VIDEO_FLAG_INTERLACED);
|
||||
tmp_state.top_field_first =
|
||||
GST_VIDEO_INFO_FLAG_IS_SET (&tmp_info, GST_VIDEO_FLAG_TFF);
|
||||
GST_VIDEO_INFO_IS_INTERLACED (&tmp_info);
|
||||
|
||||
if (changed) {
|
||||
/* arrange draining pending frames */
|
||||
|
|
|
@ -383,14 +383,10 @@ gst_y4m_dec_parse_header (GstY4mDec * y4mdec, char *header)
|
|||
case '?':
|
||||
case 'p':
|
||||
y4mdec->info.interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
|
||||
y4mdec->info.flags &= ~GST_VIDEO_FLAG_INTERLACED;
|
||||
break;
|
||||
case 't':
|
||||
case 'b':
|
||||
y4mdec->info.interlace_mode = GST_VIDEO_INTERLACE_MODE_INTERLEAVED;
|
||||
y4mdec->info.flags |= GST_VIDEO_FLAG_INTERLACED;
|
||||
if (interlaced_char == 't')
|
||||
y4mdec->info.flags |= GST_VIDEO_FLAG_TFF;
|
||||
break;
|
||||
default:
|
||||
GST_WARNING_OBJECT (y4mdec, "Unknown interlaced char '%c'",
|
||||
|
@ -539,9 +535,6 @@ gst_y4m_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
GST_BUFFER_DURATION (buffer) =
|
||||
gst_y4m_dec_frames_to_timestamp (y4mdec, y4mdec->frame_index + 1) -
|
||||
GST_BUFFER_TIMESTAMP (buffer);
|
||||
if (y4mdec->info.flags & GST_VIDEO_FLAG_TFF) {
|
||||
GST_BUFFER_FLAG_SET (buffer, GST_VIDEO_BUFFER_FLAG_TFF);
|
||||
}
|
||||
|
||||
y4mdec->frame_index++;
|
||||
|
||||
|
|
|
@ -126,8 +126,9 @@ gst_core_video_buffer_new (GstCoreMediaCtx * ctx, CVBufferRef cvbuf,
|
|||
GstVideoMeta *video_meta;
|
||||
|
||||
width = vinfo->width;
|
||||
video_meta = gst_buffer_add_video_meta_full (buf, GST_VIDEO_FLAG_NONE,
|
||||
GST_VIDEO_FORMAT_NV12, width, height, n_planes, offset, stride);
|
||||
video_meta =
|
||||
gst_buffer_add_video_meta_full (buf, GST_VIDEO_FORMAT_NV12,
|
||||
GST_VIDEO_FRAME_FLAG_NONE, width, height, n_planes, offset, stride);
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
|
|
@ -272,8 +272,9 @@ pvr_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
|
|||
|
||||
GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
|
||||
/* these are just the defaults for now */
|
||||
meta = gst_buffer_add_video_meta (pvr, 0, GST_VIDEO_INFO_FORMAT (info),
|
||||
pvrpool->padded_width, pvrpool->padded_height);
|
||||
meta = gst_buffer_add_video_meta (pvr, GST_VIDEO_INFO_FORMAT (info),
|
||||
GST_VIDEO_FRAME_FLAG_NONE, pvrpool->padded_width,
|
||||
pvrpool->padded_height);
|
||||
if (G_UNLIKELY (meta == NULL))
|
||||
GST_WARNING_OBJECT (pool, "Failed to add GstVideoMeta");
|
||||
|
||||
|
|
Loading…
Reference in a new issue