From f6314162e09496d07b3e6d0c7768c2c28f9e1767 Mon Sep 17 00:00:00 2001 From: gb Date: Mon, 3 May 2010 22:28:02 +0000 Subject: [PATCH] Rename gst_vaapi_decoder_ffmpeg_new_from_caps() to plain gst_vaapi_decoder_ffmpeg_new(). --- gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c | 29 +-------------------- gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.h | 9 +------ gst/vaapidecode/gstvaapidecode.c | 2 +- tests/test-decode.c | 2 +- 4 files changed, 4 insertions(+), 38 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c index 17e4029c1c..a866390c05 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c @@ -608,33 +608,6 @@ gst_vaapi_decoder_ffmpeg_init(GstVaapiDecoderFfmpeg *decoder) /** * gst_vaapi_decoder_ffmpeg_new: * @display: a #GstVaapiDisplay - * @codec: a #GstVaapiCodec - * @codec_data: an optional #GstBuffer holding extra codec data, or %NULL - * - * Creates a new #GstVaapiDecoder with the specified @codec bound to - * @display. @codec_data holds extra codec data like sequence headers. - * - * Return value: the newly allocated #GstVaapiDecoder object - */ -GstVaapiDecoder * -gst_vaapi_decoder_ffmpeg_new( - GstVaapiDisplay *display, - GstVaapiCodec codec, - GstBuffer *codec_data -) -{ - g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), NULL); - - return g_object_new(GST_VAAPI_TYPE_DECODER_FFMPEG, - "display", display, - "codec", codec, - "codec-data", codec_data, - NULL); -} - -/** - * st_vaapi_decoder_ffmpeg_new_from_caps: - * @display: a #GstVaapiDisplay * @caps: a #GstCaps holding codec information * * Creates a new #GstVaapiDecoder based on FFmpeg where the codec is @@ -644,7 +617,7 @@ gst_vaapi_decoder_ffmpeg_new( * Return value: the newly allocated #GstVaapiDecoder object */ GstVaapiDecoder * -gst_vaapi_decoder_ffmpeg_new_from_caps(GstVaapiDisplay *display, GstCaps *caps) +gst_vaapi_decoder_ffmpeg_new(GstVaapiDisplay *display, GstCaps *caps) { GstVaapiDecoderFfmpeg *ffdecoder; diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.h b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.h index acf5bf3836..ef0331801d 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.h @@ -80,14 +80,7 @@ GType gst_vaapi_decoder_ffmpeg_get_type(void); GstVaapiDecoder * -gst_vaapi_decoder_ffmpeg_new( - GstVaapiDisplay *display, - GstVaapiCodec codec, - GstBuffer *codec_data -); - -GstVaapiDecoder * -gst_vaapi_decoder_ffmpeg_new_from_caps(GstVaapiDisplay *display, GstCaps *caps); +gst_vaapi_decoder_ffmpeg_new(GstVaapiDisplay *display, GstCaps *caps); G_END_DECLS diff --git a/gst/vaapidecode/gstvaapidecode.c b/gst/vaapidecode/gstvaapidecode.c index 82131b36d2..811052447a 100644 --- a/gst/vaapidecode/gstvaapidecode.c +++ b/gst/vaapidecode/gstvaapidecode.c @@ -178,7 +178,7 @@ gst_vaapidecode_create(GstVaapiDecode *decode) if (decode->use_ffmpeg) decode->decoder = - gst_vaapi_decoder_ffmpeg_new_from_caps(display, decode->decoder_caps); + gst_vaapi_decoder_ffmpeg_new(display, decode->decoder_caps); return decode->decoder != NULL; } diff --git a/tests/test-decode.c b/tests/test-decode.c index e17c229d40..995e691c58 100644 --- a/tests/test-decode.c +++ b/tests/test-decode.c @@ -126,7 +126,7 @@ main(int argc, char *argv[]) NULL ); - decoder = gst_vaapi_decoder_ffmpeg_new_from_caps(display, decoder_caps); + decoder = gst_vaapi_decoder_ffmpeg_new(display, decoder_caps); if (!decoder) g_error("could not create FFmpeg decoder"); gst_caps_unref(decoder_caps);