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 Make sure you have a space before and after all plugins
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 \
annodex apetag cairo cairo_gobject dv1394 flac gdk_pixbuf jpeg libdv libpng \
oss oss4 shout2 \

View file

@ -1265,7 +1265,7 @@ gst_qt_mux_send_buffered_data (GstQTMux * qtmux, guint64 * offset)
gsize size;
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);
if (size == 0) {
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) {
const gchar *format;
GstVideoFormat fmt;
const GstVideoFormatInfo *vinfo;
format = gst_structure_get_string (structure, "format");
fmt = gst_video_format_from_string (format);
vinfo = gst_video_format_get_info (fmt);
switch (fmt) {
case GST_VIDEO_FORMAT_UYVY:
@ -2976,9 +2978,9 @@ gst_qt_mux_video_sink_set_caps (GstPad * pad, GstCaps * caps)
sync = FALSE;
break;
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.depth = gst_video_format_get_pixel_stride (fmt, 0) * 8;
entry.depth = GST_VIDEO_FORMAT_INFO_PSTRIDE (vinfo, 0) * 8;
sync = FALSE;
}
break;

View file

@ -3411,6 +3411,7 @@ gst_qtdemux_clip_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
guint offset;
size = gst_buffer_get_size (buf);
offset = 0;
/* depending on the type, setup the clip parameters */
if (stream->subtype == FOURCC_soun) {
@ -3529,6 +3530,8 @@ gst_qtdemux_process_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
return buf;
}
data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
if (G_LIKELY (size >= 2)) {
nsize = GST_READ_UINT16_BE (data);
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,
* 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);
gst_buffer_unmap (buf, data, size);
if (str) {