isomp4: fixup after small api changes

Port to recently changed api so that it compiles again.
This commit is contained in:
Wim Taymans 2011-08-05 08:59:59 +02:00
parent eb8075111d
commit 5fa0c28bc4
3 changed files with 12 additions and 8 deletions

View file

@ -313,7 +313,7 @@ dnl *** plug-ins to include ***
dnl Non ported plugins (non-dependant, then dependant) dnl Non ported plugins (non-dependant, then dependant)
dnl Make sure you have a space before and after all plugins dnl Make sure you have a space before and after all plugins
GST_PLUGINS_NONPORTED=" deinterlace flx goom2k1 icydemux id3demux \ GST_PLUGINS_NONPORTED=" deinterlace flx goom2k1 icydemux id3demux \
imagefreeze interleave isomp4 law matroska monoscope shapewipe smpte \ imagefreeze interleave law matroska monoscope shapewipe smpte \
videobox videocrop videomixer \ videobox videocrop videomixer \
annodex apetag cairo cairo_gobject dv1394 flac gdk_pixbuf jpeg libdv libpng \ annodex apetag cairo cairo_gobject dv1394 flac gdk_pixbuf jpeg libdv libpng \
oss oss4 shout2 \ oss oss4 shout2 \

View file

@ -1265,7 +1265,7 @@ gst_qt_mux_send_buffered_data (GstQTMux * qtmux, guint64 * offset)
gsize size; gsize size;
buf = gst_buffer_new_and_alloc (bufsize); buf = gst_buffer_new_and_alloc (bufsize);
gst_buffer_map (buf, &size, NULL, GST_MAP_WRITE); data = gst_buffer_map (buf, &size, NULL, GST_MAP_WRITE);
size = fread (data, sizeof (guint8), bufsize, qtmux->fast_start_file); size = fread (data, sizeof (guint8), bufsize, qtmux->fast_start_file);
if (size == 0) { if (size == 0) {
gst_buffer_unmap (buf, data, -1); gst_buffer_unmap (buf, data, -1);
@ -2963,9 +2963,11 @@ gst_qt_mux_video_sink_set_caps (GstPad * pad, GstCaps * caps)
if (strcmp (mimetype, "video/x-raw") == 0) { if (strcmp (mimetype, "video/x-raw") == 0) {
const gchar *format; const gchar *format;
GstVideoFormat fmt; GstVideoFormat fmt;
const GstVideoFormatInfo *vinfo;
format = gst_structure_get_string (structure, "format"); format = gst_structure_get_string (structure, "format");
fmt = gst_video_format_from_string (format); fmt = gst_video_format_from_string (format);
vinfo = gst_video_format_get_info (fmt);
switch (fmt) { switch (fmt) {
case GST_VIDEO_FORMAT_UYVY: case GST_VIDEO_FORMAT_UYVY:
@ -2976,9 +2978,9 @@ gst_qt_mux_video_sink_set_caps (GstPad * pad, GstCaps * caps)
sync = FALSE; sync = FALSE;
break; break;
default: default:
if (gst_video_format_is_rgb (fmt)) { if (GST_VIDEO_FORMAT_INFO_FLAGS (vinfo) & GST_VIDEO_FORMAT_FLAG_RGB) {
entry.fourcc = FOURCC_raw_; entry.fourcc = FOURCC_raw_;
entry.depth = gst_video_format_get_pixel_stride (fmt, 0) * 8; entry.depth = GST_VIDEO_FORMAT_INFO_PSTRIDE (vinfo, 0) * 8;
sync = FALSE; sync = FALSE;
} }
break; break;

View file

@ -3411,6 +3411,7 @@ gst_qtdemux_clip_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
guint offset; guint offset;
size = gst_buffer_get_size (buf); size = gst_buffer_get_size (buf);
offset = 0;
/* depending on the type, setup the clip parameters */ /* depending on the type, setup the clip parameters */
if (stream->subtype == FOURCC_soun) { if (stream->subtype == FOURCC_soun) {
@ -3529,6 +3530,8 @@ gst_qtdemux_process_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
return buf; return buf;
} }
data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
if (G_LIKELY (size >= 2)) { if (G_LIKELY (size >= 2)) {
nsize = GST_READ_UINT16_BE (data); nsize = GST_READ_UINT16_BE (data);
nsize = MIN (nsize, size - 2); nsize = MIN (nsize, size - 2);
@ -3538,7 +3541,6 @@ gst_qtdemux_process_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
/* takes care of UTF-8 validation or UTF-16 recognition, /* takes care of UTF-8 validation or UTF-16 recognition,
* no other encoding expected */ * no other encoding expected */
data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
str = gst_tag_freeform_string_to_utf8 ((gchar *) data + 2, nsize, NULL); str = gst_tag_freeform_string_to_utf8 ((gchar *) data + 2, nsize, NULL);
gst_buffer_unmap (buf, data, size); gst_buffer_unmap (buf, data, size);
if (str) { if (str) {
@ -5253,7 +5255,7 @@ qtdemux_stbl_init (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * stbl)
/* sync sample atom */ /* sync sample atom */
stream->stps_present = FALSE; stream->stps_present = FALSE;
if ((stream->stss_present = if ((stream->stss_present =
!!qtdemux_tree_get_child_by_type_full (stbl, FOURCC_stss, ! !qtdemux_tree_get_child_by_type_full (stbl, FOURCC_stss,
&stream->stss) ? TRUE : FALSE) == TRUE) { &stream->stss) ? TRUE : FALSE) == TRUE) {
/* copy atom data into a new buffer for later use */ /* copy atom data into a new buffer for later use */
stream->stss.data = g_memdup (stream->stss.data, stream->stss.size); stream->stss.data = g_memdup (stream->stss.data, stream->stss.size);
@ -5271,7 +5273,7 @@ qtdemux_stbl_init (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * stbl)
/* partial sync sample atom */ /* partial sync sample atom */
if ((stream->stps_present = if ((stream->stps_present =
!!qtdemux_tree_get_child_by_type_full (stbl, FOURCC_stps, ! !qtdemux_tree_get_child_by_type_full (stbl, FOURCC_stps,
&stream->stps) ? TRUE : FALSE) == TRUE) { &stream->stps) ? TRUE : FALSE) == TRUE) {
/* copy atom data into a new buffer for later use */ /* copy atom data into a new buffer for later use */
stream->stps.data = g_memdup (stream->stps.data, stream->stps.size); stream->stps.data = g_memdup (stream->stps.data, stream->stps.size);
@ -5390,7 +5392,7 @@ qtdemux_stbl_init (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * stbl)
/* composition time-to-sample */ /* composition time-to-sample */
if ((stream->ctts_present = if ((stream->ctts_present =
!!qtdemux_tree_get_child_by_type_full (stbl, FOURCC_ctts, ! !qtdemux_tree_get_child_by_type_full (stbl, FOURCC_ctts,
&stream->ctts) ? TRUE : FALSE) == TRUE) { &stream->ctts) ? TRUE : FALSE) == TRUE) {
/* copy atom data into a new buffer for later use */ /* copy atom data into a new buffer for later use */
stream->ctts.data = g_memdup (stream->ctts.data, stream->ctts.size); stream->ctts.data = g_memdup (stream->ctts.data, stream->ctts.size);