From 0d724f58f230e3c5ccf3def2b342726e239e1e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 9 Jul 2011 11:41:42 +0200 Subject: [PATCH] basevideo: Move the utils from the codec header to its own header --- omx/Makefile.am | 3 ++- omx/gstbasevideocodec.h | 11 ---------- omx/gstbasevideodecoder.c | 1 + omx/gstbasevideoencoder.c | 1 + omx/gstbasevideoutils.c | 2 +- omx/gstbasevideoutils.h | 46 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 omx/gstbasevideoutils.h diff --git a/omx/Makefile.am b/omx/Makefile.am index 663361128e..590fd75bfa 100644 --- a/omx/Makefile.am +++ b/omx/Makefile.am @@ -14,7 +14,8 @@ noinst_HEADERS = \ gstomxmpeg4videodec.h \ gstbasevideocodec.h \ gstbasevideodecoder.h \ - gstbasevideoencoder.h + gstbasevideoencoder.h \ + gstbasevideoutils.h fixbaseclasses = \ -DGstBaseVideoCodec=OMXBaseVideoCodec \ diff --git a/omx/gstbasevideocodec.h b/omx/gstbasevideocodec.h index cffc39610d..9fc2cb27d9 100644 --- a/omx/gstbasevideocodec.h +++ b/omx/gstbasevideocodec.h @@ -175,17 +175,6 @@ GType gst_base_video_codec_get_type (void); GstVideoFrame * gst_base_video_codec_new_frame (GstBaseVideoCodec *base_video_codec); void gst_base_video_codec_free_frame (GstVideoFrame *frame); - -gboolean gst_base_video_rawvideo_convert (GstVideoState *state, - GstFormat src_format, gint64 src_value, - GstFormat * dest_format, gint64 *dest_value); -gboolean gst_base_video_encoded_video_convert (GstVideoState * state, - gint64 bytes, gint64 time, GstFormat src_format, - gint64 src_value, GstFormat * dest_format, gint64 * dest_value); - -GstClockTime gst_video_state_get_timestamp (const GstVideoState *state, - GstSegment *segment, int frame_number); - G_END_DECLS #endif diff --git a/omx/gstbasevideodecoder.c b/omx/gstbasevideodecoder.c index 3862a50ad5..48df6ea0af 100644 --- a/omx/gstbasevideodecoder.c +++ b/omx/gstbasevideodecoder.c @@ -128,6 +128,7 @@ #endif #include "gstbasevideodecoder.h" +#include "gstbasevideoutils.h" #include diff --git a/omx/gstbasevideoencoder.c b/omx/gstbasevideoencoder.c index 1c27a72ef1..c69424d9c8 100644 --- a/omx/gstbasevideoencoder.c +++ b/omx/gstbasevideoencoder.c @@ -106,6 +106,7 @@ #endif #include "gstbasevideoencoder.h" +#include "gstbasevideoutils.h" GST_DEBUG_CATEGORY (basevideoencoder_debug); #define GST_CAT_DEFAULT basevideoencoder_debug diff --git a/omx/gstbasevideoutils.c b/omx/gstbasevideoutils.c index 2d83213478..507ad07dae 100644 --- a/omx/gstbasevideoutils.c +++ b/omx/gstbasevideoutils.c @@ -21,7 +21,7 @@ #include "config.h" #endif -#include "gstbasevideocodec.h" +#include "gstbasevideoutils.h" #include diff --git a/omx/gstbasevideoutils.h b/omx/gstbasevideoutils.h new file mode 100644 index 0000000000..aeca2d1b7e --- /dev/null +++ b/omx/gstbasevideoutils.h @@ -0,0 +1,46 @@ +/* GStreamer + * Copyright (C) 2008 David Schleef + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef _GST_BASE_VIDEO_UTILS_H_ +#define _GST_BASE_VIDEO_UTILS_H_ + +#ifndef GST_USE_UNSTABLE_API +#warning "GstBaseVideoCodec is unstable API and may change in future." +#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." +#endif + +#include +#include +#include "gstbasevideocodec.h" + +G_BEGIN_DECLS + +gboolean gst_base_video_rawvideo_convert (GstVideoState *state, + GstFormat src_format, gint64 src_value, + GstFormat * dest_format, gint64 *dest_value); +gboolean gst_base_video_encoded_video_convert (GstVideoState * state, + gint64 bytes, gint64 time, GstFormat src_format, + gint64 src_value, GstFormat * dest_format, gint64 * dest_value); + +GstClockTime gst_video_state_get_timestamp (const GstVideoState *state, + GstSegment *segment, int frame_number); + +G_END_DECLS + +#endif