mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
surfaceproxy: drop accessors to obsolete attributes.
Make GstVaapiSurfaceProxy only a thin wrapper around a VA context and a VA surface. i.e. drop any other attribute like timestamp, duration, interlaced or top-field-first.
This commit is contained in:
parent
8c2d9bcd24
commit
51d028a628
3 changed files with 0 additions and 229 deletions
|
@ -330,16 +330,6 @@ gst_vaapi_picture_output(GstVaapiPicture *picture)
|
|||
GST_VIDEO_CODEC_FRAME_FLAG_SET(out_frame,
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_TFF);
|
||||
|
||||
/* XXX: to be removed later */
|
||||
if (GST_CLOCK_TIME_IS_VALID(out_frame->pts))
|
||||
gst_vaapi_surface_proxy_set_timestamp(proxy, out_frame->pts);
|
||||
if (GST_CLOCK_TIME_IS_VALID(out_frame->duration))
|
||||
gst_vaapi_surface_proxy_set_duration(proxy, out_frame->duration);
|
||||
if (GST_VAAPI_PICTURE_IS_INTERLACED(picture))
|
||||
gst_vaapi_surface_proxy_set_interlaced(proxy, TRUE);
|
||||
if (GST_VAAPI_PICTURE_IS_TFF(picture))
|
||||
gst_vaapi_surface_proxy_set_tff(proxy, TRUE);
|
||||
|
||||
gst_vaapi_decoder_push_frame(GET_DECODER(picture), out_frame);
|
||||
|
||||
GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_OUTPUT);
|
||||
|
|
|
@ -45,10 +45,6 @@ struct _GstVaapiSurfaceProxy {
|
|||
|
||||
GstVaapiContext *context;
|
||||
GstVaapiSurface *surface;
|
||||
GstClockTime timestamp;
|
||||
GstClockTime duration;
|
||||
guint is_interlaced : 1;
|
||||
guint tff : 1;
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -58,16 +54,6 @@ gst_vaapi_surface_proxy_finalize(GstVaapiSurfaceProxy *proxy)
|
|||
gst_vaapi_surface_proxy_set_context(proxy, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_vaapi_surface_proxy_init(GstVaapiSurfaceProxy *proxy)
|
||||
{
|
||||
proxy->timestamp = GST_CLOCK_TIME_NONE;
|
||||
proxy->duration = GST_CLOCK_TIME_NONE;
|
||||
|
||||
proxy->is_interlaced = FALSE;
|
||||
proxy->tff = FALSE;
|
||||
}
|
||||
|
||||
static inline const GstVaapiMiniObjectClass *
|
||||
gst_vaapi_surface_proxy_class(void)
|
||||
{
|
||||
|
@ -102,7 +88,6 @@ gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface)
|
|||
return NULL;
|
||||
|
||||
proxy = GST_VAAPI_SURFACE_PROXY(object);
|
||||
gst_vaapi_surface_proxy_init(proxy);
|
||||
gst_vaapi_surface_proxy_set_context(proxy, context);
|
||||
gst_vaapi_surface_proxy_set_surface(proxy, surface);
|
||||
return proxy;
|
||||
|
@ -297,139 +282,3 @@ gst_vaapi_surface_proxy_set_surface(
|
|||
if (surface)
|
||||
proxy->surface = g_object_ref(surface);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_get_timestamp:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Returns the presentation timestamp of the #GstVaapiSurface held by @proxy.
|
||||
*
|
||||
* Return value: the presentation timestamp of the surface, or
|
||||
* %GST_CLOCK_TIME_NONE is none was set
|
||||
*/
|
||||
GstClockTime
|
||||
gst_vaapi_surface_proxy_get_timestamp(GstVaapiSurfaceProxy *proxy)
|
||||
{
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy),
|
||||
GST_CLOCK_TIME_NONE);
|
||||
|
||||
return proxy->timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_set_timestamp:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
* @timestamp: the new presentation timestamp as a #GstClockTime
|
||||
*
|
||||
* Sets the presentation timestamp of the @proxy surface to @timestamp.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_timestamp(
|
||||
GstVaapiSurfaceProxy *proxy,
|
||||
GstClockTime timestamp
|
||||
)
|
||||
{
|
||||
g_return_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy));
|
||||
|
||||
proxy->timestamp = timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_get_duration:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Returns the presentation duration of the #GstVaapiSurface held by @proxy.
|
||||
*
|
||||
* Return value: the presentation duration of the surface, or
|
||||
* %GST_CLOCK_TIME_NONE is none was set
|
||||
*/
|
||||
GstClockTime
|
||||
gst_vaapi_surface_proxy_get_duration(GstVaapiSurfaceProxy *proxy)
|
||||
{
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy),
|
||||
GST_CLOCK_TIME_NONE);
|
||||
|
||||
return proxy->duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_set_duration:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
* @duration: the presentation duration of this surface as a #GstClockTime
|
||||
*
|
||||
* Sets the presentation duration of the @proxy surface to @duration.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_duration(
|
||||
GstVaapiSurfaceProxy *proxy,
|
||||
GstClockTime duration
|
||||
)
|
||||
{
|
||||
g_return_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy));
|
||||
|
||||
proxy->duration = duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_get_interlaced:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Returns whether the @proxy holds an interlaced #GstVaapiSurface or not.
|
||||
*
|
||||
* Return value: %TRUE if the underlying surface is interlaced, %FALSE
|
||||
* otherwise.
|
||||
*/
|
||||
gboolean
|
||||
gst_vaapi_surface_proxy_get_interlaced(GstVaapiSurfaceProxy *proxy)
|
||||
{
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy), FALSE);
|
||||
|
||||
return proxy->is_interlaced;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_set_interlaced:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
* @b: a boolean value
|
||||
*
|
||||
* Sets whether the underlying #GstVaapiSurface for @proxy is interlaced
|
||||
* or not.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_interlaced(GstVaapiSurfaceProxy *proxy, gboolean b)
|
||||
{
|
||||
g_return_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy));
|
||||
|
||||
proxy->is_interlaced = b;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_get_tff:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Returns the TFF flag of the #GstVaapiSurface held by @proxy.
|
||||
*
|
||||
* Return value: the TFF flag of the surface
|
||||
*/
|
||||
gboolean
|
||||
gst_vaapi_surface_proxy_get_tff(GstVaapiSurfaceProxy *proxy)
|
||||
{
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy), FALSE);
|
||||
|
||||
return proxy->is_interlaced && proxy->tff;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_proxy_set_tff:
|
||||
* @proxy: a #GstVaapiSurfaceProxy
|
||||
* @tff: the new value of the TFF flag
|
||||
*
|
||||
* Sets the TFF flag of the @proxy surface to @tff.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_tff(GstVaapiSurfaceProxy *proxy, gboolean tff)
|
||||
{
|
||||
g_return_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy));
|
||||
|
||||
proxy->tff = tff;
|
||||
}
|
||||
|
|
|
@ -39,44 +39,6 @@ typedef struct _GstVaapiSurfaceProxy GstVaapiSurfaceProxy;
|
|||
#define GST_VAAPI_SURFACE_PROXY_SURFACE(surface) \
|
||||
gst_vaapi_surface_proxy_get_surface(surface)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_PROXY_TIMESTAMP:
|
||||
* @surface: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Macro that evaluates to the @surface timestamp, or
|
||||
* %GST_CLOCK_TIME_NONE if none was set.
|
||||
*/
|
||||
#define GST_VAAPI_SURFACE_PROXY_TIMESTAMP(surface) \
|
||||
gst_vaapi_surface_proxy_get_timestamp(surface)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_PROXY_DURATION:
|
||||
* @surface: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Macro that evaluates to the amount of time the @surface should be
|
||||
* displayed, or %GST_CLOCK_TIME_NONE if none was set.
|
||||
*/
|
||||
#define GST_VAAPI_SURFACE_PROXY_DURATION(surface) \
|
||||
gst_vaapi_surface_proxy_get_duration(surface)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_PROXY_INTERLACED:
|
||||
* @surface: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Macro that evaluates to %TRUE if the @surface is interlaced.
|
||||
*/
|
||||
#define GST_VAAPI_SURFACE_PROXY_INTERLACED(surface) \
|
||||
gst_vaapi_surface_proxy_get_interlaced(surface)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_PROXY_TFF:
|
||||
* @surface: a #GstVaapiSurfaceProxy
|
||||
*
|
||||
* Macro that evaluates to the tff flag of the @surface
|
||||
*/
|
||||
#define GST_VAAPI_SURFACE_PROXY_TFF(surface) \
|
||||
gst_vaapi_surface_proxy_get_tff(surface)
|
||||
|
||||
GstVaapiSurfaceProxy *
|
||||
gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface);
|
||||
|
||||
|
@ -118,36 +80,6 @@ gst_vaapi_surface_proxy_set_surface(
|
|||
GstVaapiSurface *surface
|
||||
);
|
||||
|
||||
GstClockTime
|
||||
gst_vaapi_surface_proxy_get_timestamp(GstVaapiSurfaceProxy *proxy);
|
||||
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_timestamp(
|
||||
GstVaapiSurfaceProxy *proxy,
|
||||
GstClockTime timestamp
|
||||
);
|
||||
|
||||
GstClockTime
|
||||
gst_vaapi_surface_proxy_get_duration(GstVaapiSurfaceProxy *proxy);
|
||||
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_duration(
|
||||
GstVaapiSurfaceProxy *proxy,
|
||||
GstClockTime duration
|
||||
);
|
||||
|
||||
gboolean
|
||||
gst_vaapi_surface_proxy_get_interlaced(GstVaapiSurfaceProxy *proxy);
|
||||
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_interlaced(GstVaapiSurfaceProxy *proxy, gboolean b);
|
||||
|
||||
gboolean
|
||||
gst_vaapi_surface_proxy_get_tff(GstVaapiSurfaceProxy *proxy);
|
||||
|
||||
void
|
||||
gst_vaapi_surface_proxy_set_tff(GstVaapiSurfaceProxy *proxy, gboolean tff);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_SURFACE_PROXY_H */
|
||||
|
|
Loading…
Reference in a new issue