mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
codecs: Stop claiming constness for refcounted object
It's almost pointless and makes little sense as subclass might want to modify refcount of the object or so. And all subclasses are already casting them to non-const version as well. In a general sense, we need to avoid passing refcounted object with const qualifier. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1238>
This commit is contained in:
parent
499c89c729
commit
6434d69f8c
8 changed files with 23 additions and 23 deletions
|
@ -151,7 +151,7 @@ struct _GstH264DecoderClass
|
|||
* Since: 1.20
|
||||
*/
|
||||
GstFlowReturn (*new_field_picture) (GstH264Decoder * decoder,
|
||||
const GstH264Picture * first_field,
|
||||
GstH264Picture * first_field,
|
||||
GstH264Picture * second_field);
|
||||
|
||||
/**
|
||||
|
|
|
@ -113,7 +113,7 @@ struct _GstMpeg2DecoderClass
|
|||
* Since: 1.20
|
||||
*/
|
||||
GstFlowReturn (*new_field_picture) (GstMpeg2Decoder * decoder,
|
||||
const GstMpeg2Picture * first_field,
|
||||
GstMpeg2Picture * first_field,
|
||||
GstMpeg2Picture * second_field);
|
||||
|
||||
/**
|
||||
|
|
|
@ -146,8 +146,9 @@ static GstFlowReturn gst_d3d11_h264_dec_new_sequence (GstH264Decoder * decoder,
|
|||
const GstH264SPS * sps, gint max_dpb_size);
|
||||
static GstFlowReturn gst_d3d11_h264_dec_new_picture (GstH264Decoder * decoder,
|
||||
GstVideoCodecFrame * frame, GstH264Picture * picture);
|
||||
static GstFlowReturn gst_d3d11_h264_dec_new_field_picture (GstH264Decoder *
|
||||
decoder, const GstH264Picture * first_field, GstH264Picture * second_field);
|
||||
static GstFlowReturn
|
||||
gst_d3d11_h264_dec_new_field_picture (GstH264Decoder * decoder,
|
||||
GstH264Picture * first_field, GstH264Picture * second_field);
|
||||
static GstFlowReturn gst_d3d11_h264_dec_start_picture (GstH264Decoder * decoder,
|
||||
GstH264Picture * picture, GstH264Slice * slice, GstH264Dpb * dpb);
|
||||
static GstFlowReturn gst_d3d11_h264_dec_decode_slice (GstH264Decoder * decoder,
|
||||
|
@ -497,13 +498,12 @@ gst_d3d11_h264_dec_new_picture (GstH264Decoder * decoder,
|
|||
|
||||
static GstFlowReturn
|
||||
gst_d3d11_h264_dec_new_field_picture (GstH264Decoder * decoder,
|
||||
const GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
{
|
||||
GstD3D11H264Dec *self = GST_D3D11_H264_DEC (decoder);
|
||||
GstBuffer *view_buffer;
|
||||
|
||||
view_buffer = (GstBuffer *) gst_h264_picture_get_user_data ((GstH264Picture *)
|
||||
first_field);
|
||||
view_buffer = (GstBuffer *) gst_h264_picture_get_user_data (first_field);
|
||||
|
||||
if (!view_buffer) {
|
||||
GST_WARNING_OBJECT (self, "First picture does not have output view buffer");
|
||||
|
|
|
@ -123,9 +123,9 @@ static GstFlowReturn gst_d3d11_mpeg2_dec_new_sequence (GstMpeg2Decoder *
|
|||
const GstMpegVideoSequenceScalableExt * seq_scalable_ext);
|
||||
static GstFlowReturn gst_d3d11_mpeg2_dec_new_picture (GstMpeg2Decoder * decoder,
|
||||
GstVideoCodecFrame * frame, GstMpeg2Picture * picture);
|
||||
static GstFlowReturn gst_d3d11_mpeg2_dec_new_field_picture (GstMpeg2Decoder *
|
||||
decoder, const GstMpeg2Picture * first_field,
|
||||
GstMpeg2Picture * second_field);
|
||||
static GstFlowReturn
|
||||
gst_d3d11_mpeg2_dec_new_field_picture (GstMpeg2Decoder * decoder,
|
||||
GstMpeg2Picture * first_field, GstMpeg2Picture * second_field);
|
||||
static GstFlowReturn gst_d3d11_mpeg2_dec_start_picture (GstMpeg2Decoder *
|
||||
decoder, GstMpeg2Picture * picture, GstMpeg2Slice * slice,
|
||||
GstMpeg2Picture * prev_picture, GstMpeg2Picture * next_picture);
|
||||
|
@ -438,13 +438,13 @@ gst_d3d11_mpeg2_dec_new_picture (GstMpeg2Decoder * decoder,
|
|||
|
||||
static GstFlowReturn
|
||||
gst_d3d11_mpeg2_dec_new_field_picture (GstMpeg2Decoder * decoder,
|
||||
const GstMpeg2Picture * first_field, GstMpeg2Picture * second_field)
|
||||
GstMpeg2Picture * first_field, GstMpeg2Picture * second_field)
|
||||
{
|
||||
GstD3D11Mpeg2Dec *self = GST_D3D11_MPEG2_DEC (decoder);
|
||||
GstBuffer *view_buffer;
|
||||
|
||||
view_buffer = (GstBuffer *)
|
||||
gst_mpeg2_picture_get_user_data ((GstMpeg2Picture *) first_field);
|
||||
gst_mpeg2_picture_get_user_data (first_field);
|
||||
|
||||
if (!view_buffer) {
|
||||
GST_WARNING_OBJECT (self, "First picture does not have output view buffer");
|
||||
|
|
|
@ -141,8 +141,9 @@ static GstFlowReturn gst_nv_h264_dec_new_sequence (GstH264Decoder * decoder,
|
|||
const GstH264SPS * sps, gint max_dpb_size);
|
||||
static GstFlowReturn gst_nv_h264_dec_new_picture (GstH264Decoder * decoder,
|
||||
GstVideoCodecFrame * frame, GstH264Picture * picture);
|
||||
static GstFlowReturn gst_nv_h264_dec_new_field_picture (GstH264Decoder *
|
||||
decoder, const GstH264Picture * first_field, GstH264Picture * second_field);
|
||||
static GstFlowReturn
|
||||
gst_nv_h264_dec_new_field_picture (GstH264Decoder * decoder,
|
||||
GstH264Picture * first_field, GstH264Picture * second_field);
|
||||
static GstFlowReturn gst_nv_h264_dec_output_picture (GstH264Decoder *
|
||||
decoder, GstVideoCodecFrame * frame, GstH264Picture * picture);
|
||||
static GstFlowReturn gst_nv_h264_dec_start_picture (GstH264Decoder * decoder,
|
||||
|
@ -486,12 +487,12 @@ gst_nv_h264_dec_new_picture (GstH264Decoder * decoder,
|
|||
|
||||
static GstFlowReturn
|
||||
gst_nv_h264_dec_new_field_picture (GstH264Decoder * decoder,
|
||||
const GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
{
|
||||
GstNvDecoderFrame *nv_frame;
|
||||
|
||||
nv_frame = (GstNvDecoderFrame *)
|
||||
gst_h264_picture_get_user_data ((GstH264Picture *) first_field);
|
||||
gst_h264_picture_get_user_data (first_field);
|
||||
if (!nv_frame) {
|
||||
GST_ERROR_OBJECT (decoder,
|
||||
"No decoder frame in the first picture %p", first_field);
|
||||
|
|
|
@ -1307,11 +1307,10 @@ gst_v4l2_codec_h264_dec_end_picture (GstH264Decoder * decoder,
|
|||
|
||||
static GstFlowReturn
|
||||
gst_v4l2_codec_h264_dec_new_field_picture (GstH264Decoder * decoder,
|
||||
const GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
{
|
||||
GstV4l2CodecH264Dec *self = GST_V4L2_CODEC_H264_DEC (decoder);
|
||||
GstV4l2Request *request =
|
||||
gst_h264_picture_get_user_data ((GstH264Picture *) first_field);
|
||||
GstV4l2Request *request = gst_h264_picture_get_user_data (first_field);
|
||||
|
||||
if (!request) {
|
||||
GST_WARNING_OBJECT (self,
|
||||
|
|
|
@ -527,13 +527,13 @@ error:
|
|||
|
||||
static GstFlowReturn
|
||||
gst_va_h264_dec_new_field_picture (GstH264Decoder * decoder,
|
||||
const GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
GstH264Picture * first_field, GstH264Picture * second_field)
|
||||
{
|
||||
GstVaDecodePicture *first_pic, *second_pic;
|
||||
GstVaH264Dec *self = GST_VA_H264_DEC (decoder);
|
||||
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
|
||||
|
||||
first_pic = gst_h264_picture_get_user_data ((GstH264Picture *) first_field);
|
||||
first_pic = gst_h264_picture_get_user_data (first_field);
|
||||
if (!first_pic)
|
||||
return GST_FLOW_ERROR;
|
||||
|
||||
|
|
|
@ -324,13 +324,13 @@ error:
|
|||
|
||||
static GstFlowReturn
|
||||
gst_va_mpeg2_dec_new_field_picture (GstMpeg2Decoder * decoder,
|
||||
const GstMpeg2Picture * first_field, GstMpeg2Picture * second_field)
|
||||
GstMpeg2Picture * first_field, GstMpeg2Picture * second_field)
|
||||
{
|
||||
GstVaDecodePicture *first_pic, *second_pic;
|
||||
GstVaMpeg2Dec *self = GST_VA_MPEG2_DEC (decoder);
|
||||
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
|
||||
|
||||
first_pic = gst_mpeg2_picture_get_user_data ((GstMpeg2Picture *) first_field);
|
||||
first_pic = gst_mpeg2_picture_get_user_data (first_field);
|
||||
if (!first_pic)
|
||||
return GST_FLOW_ERROR;
|
||||
|
||||
|
|
Loading…
Reference in a new issue