summaryrefslogtreecommitdiff
path: root/ext/dirac
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-10-09 17:36:07 -0700
committerDavid Schleef <ds@schleef.org>2010-10-15 16:30:57 -0700
commitfe50055715f567184d20ed2c3cdbcbfeff75a37a (patch)
treeadad2ce81ae0d0e96b1eba1fac728341e8e56d70 /ext/dirac
parent18c3302608643a196486979dde3e1c83319d4f06 (diff)
downloadgstreamer-plugins-bad-fe50055715f567184d20ed2c3cdbcbfeff75a37a.tar.gz
basevideo: Move common fields/functions to basecodec
Diffstat (limited to 'ext/dirac')
-rw-r--r--ext/dirac/gstdiracenc.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/ext/dirac/gstdiracenc.cc b/ext/dirac/gstdiracenc.cc
index 7094779d3..6e14fff69 100644
--- a/ext/dirac/gstdiracenc.cc
+++ b/ext/dirac/gstdiracenc.cc
@@ -1247,7 +1247,7 @@ gst_dirac_enc_shape_output_ogg (GstBaseVideoEncoder * base_video_encoder,
GST_BUFFER_OFFSET_END (buf) = dirac_enc->last_granulepos;
}
- gst_buffer_set_caps (buf, base_video_encoder->caps);
+ gst_buffer_set_caps (buf, GST_BASE_VIDEO_CODEC(base_video_encoder)->caps);
return gst_pad_push (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_encoder), buf);
}
@@ -1262,12 +1262,12 @@ gst_dirac_enc_shape_output_quicktime (GstBaseVideoEncoder * base_video_encoder,
state = gst_base_video_encoder_get_state (base_video_encoder);
GST_BUFFER_TIMESTAMP (buf) = gst_video_state_get_timestamp (state,
- &base_video_encoder->segment, frame->presentation_frame_number);
+ &GST_BASE_VIDEO_CODEC(base_video_encoder)->segment, frame->presentation_frame_number);
GST_BUFFER_DURATION (buf) = gst_video_state_get_timestamp (state,
- &base_video_encoder->segment,
+ &GST_BASE_VIDEO_CODEC(base_video_encoder)->segment,
frame->presentation_frame_number + 1) - GST_BUFFER_TIMESTAMP (buf);
- GST_BUFFER_OFFSET_END (buf) =
- gst_video_state_get_timestamp (state, &base_video_encoder->segment,
+ GST_BUFFER_OFFSET_END (buf) = gst_video_state_get_timestamp (state,
+ &GST_BASE_VIDEO_CODEC(base_video_encoder)->segment,
frame->system_frame_number);
GST_BUFFER_OFFSET (buf) = GST_CLOCK_TIME_NONE;
@@ -1278,7 +1278,7 @@ gst_dirac_enc_shape_output_quicktime (GstBaseVideoEncoder * base_video_encoder,
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
}
- gst_buffer_set_caps (buf, base_video_encoder->caps);
+ gst_buffer_set_caps (buf, GST_BASE_VIDEO_CODEC(base_video_encoder)->caps);
return gst_pad_push (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_encoder), buf);
}
@@ -1293,17 +1293,19 @@ gst_dirac_enc_shape_output_mp4 (GstBaseVideoEncoder * base_video_encoder,
state = gst_base_video_encoder_get_state (base_video_encoder);
GST_BUFFER_TIMESTAMP (buf) = gst_video_state_get_timestamp (state,
- &base_video_encoder->segment, frame->presentation_frame_number);
+ &GST_BASE_VIDEO_CODEC(base_video_encoder)->segment,
+ frame->presentation_frame_number);
GST_BUFFER_DURATION (buf) = gst_video_state_get_timestamp (state,
- &base_video_encoder->segment,
+ &GST_BASE_VIDEO_CODEC(base_video_encoder)->segment,
frame->presentation_frame_number + 1) - GST_BUFFER_TIMESTAMP (buf);
- GST_BUFFER_OFFSET_END (buf) =
- gst_video_state_get_timestamp (state, &base_video_encoder->segment,
+ GST_BUFFER_OFFSET_END (buf) = gst_video_state_get_timestamp (state,
+ &GST_BASE_VIDEO_CODEC(base_video_encoder)->segment,
frame->decode_frame_number);
GST_BUFFER_OFFSET (buf) = GST_CLOCK_TIME_NONE;
GST_BUFFER_OFFSET_END (buf) = gst_video_state_get_timestamp (state,
- &base_video_encoder->segment, frame->system_frame_number);
+ &GST_BASE_VIDEO_CODEC(base_video_encoder)->segment,
+ frame->system_frame_number);
if (frame->is_sync_point &&
frame->presentation_frame_number == frame->system_frame_number) {
@@ -1312,7 +1314,7 @@ gst_dirac_enc_shape_output_mp4 (GstBaseVideoEncoder * base_video_encoder,
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
}
- gst_buffer_set_caps (buf, base_video_encoder->caps);
+ gst_buffer_set_caps (buf, GST_BASE_VIDEO_CODEC(base_video_encoder)->caps);
return gst_pad_push (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_encoder), buf);
}