if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format))
return FALSE;
- if (!gst_va_decoder_set_format (base->decoder, self->max_width,
- self->max_height, NULL))
+ if (!gst_va_decoder_set_frame_size (base->decoder, self->max_width,
+ self->max_height))
return FALSE;
}
}
gboolean
-gst_va_decoder_set_format (GstVaDecoder * self, gint coded_width,
- gint coded_height, GArray * surfaces)
+gst_va_decoder_set_frame_size_with_surfaces (GstVaDecoder * self,
+ gint coded_width, gint coded_height, GArray * surfaces)
{
VAContextID context;
VADisplay dpy;
GST_OBJECT_LOCK (self);
if (self->context != VA_INVALID_ID) {
GST_OBJECT_UNLOCK (self);
- GST_INFO_OBJECT (self, "decoder already has a format");
+ GST_INFO_OBJECT (self, "decoder already has a context");
return TRUE;
}
GST_OBJECT_UNLOCK (self);
}
gboolean
+gst_va_decoder_set_frame_size (GstVaDecoder * self, gint coded_width,
+ gint coded_height)
+{
+ return gst_va_decoder_set_frame_size_with_surfaces (self, coded_width,
+ coded_height, NULL);
+}
+
+gboolean
gst_va_decoder_change_resolution (GstVaDecoder * self, gint coded_width,
gint coded_height)
{
guint rt_format);
gboolean gst_va_decoder_close (GstVaDecoder * self);
gboolean gst_va_decoder_is_open (GstVaDecoder * self);
-gboolean gst_va_decoder_set_format (GstVaDecoder * self,
+gboolean gst_va_decoder_set_frame_size_with_surfaces
+ (GstVaDecoder * self,
gint coded_width,
gint coded_height,
GArray * surfaces);
+gboolean gst_va_decoder_set_frame_size (GstVaDecoder * self,
+ gint coded_width,
+ gint coded_height);
gboolean gst_va_decoder_change_resolution (GstVaDecoder * self,
gint coded_width,
gint coded_height);
if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format))
return FALSE;
- if (!gst_va_decoder_set_format (base->decoder, self->coded_width,
- self->coded_height, NULL))
+ if (!gst_va_decoder_set_frame_size (base->decoder, self->coded_width,
+ self->coded_height))
return FALSE;
if (base->output_state)
if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format))
return FALSE;
- if (!gst_va_decoder_set_format (base->decoder, self->coded_width,
- self->coded_height, NULL))
+ if (!gst_va_decoder_set_frame_size (base->decoder, self->coded_width,
+ self->coded_height))
return FALSE;
if (base->output_state)
if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format))
return FALSE;
- if (!gst_va_decoder_set_format (base->decoder, base->width,
- base->height, NULL))
+ if (!gst_va_decoder_set_frame_size (base->decoder, base->width, base->height))
return FALSE;
if (base->output_state)
if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format))
return FALSE;
- if (!gst_va_decoder_set_format (base->decoder, base->width, base->height,
- NULL))
+ if (!gst_va_decoder_set_frame_size (base->decoder, base->width, base->height))
return FALSE;
if (base->output_state)
if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format))
return FALSE;
- if (!gst_va_decoder_set_format (base->decoder, base->width, base->height,
- NULL))
+ if (!gst_va_decoder_set_frame_size (base->decoder, base->width,
+ base->height))
return FALSE;
}