summaryrefslogtreecommitdiffstats
path: root/sys/qtwrapper/imagedescription.c
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2008-07-01 11:28:17 +0000
committerEdward Hervey <bilboed@bilboed.com>2008-07-01 11:28:17 +0000
commitba48156d08fc80ce8d63a4ec071b2c1ab6624db9 (patch)
tree5246ae942bdb73122ce093afa19dedba3adb1d8a /sys/qtwrapper/imagedescription.c
parentc75f8c4c9b0a92367cd01f9337a99f63f973a8ef (diff)
downloadgst-plugins-bad-ba48156d08fc80ce8d63a4ec071b2c1ab6624db9.tar.gz
gst-plugins-bad-ba48156d08fc80ce8d63a4ec071b2c1ab6624db9.tar.bz2
gst-plugins-bad-ba48156d08fc80ce8d63a4ec071b2c1ab6624db9.zip
sys/qtwrapper/: Make qtwrapper compile/work on win32.
Original commit message from CVS: Patch by : Michael Smith <msmith @ xiph dot org> * sys/qtwrapper/audiodecoders.c: (qtwrapper_audio_decoder_init), (clear_AudioStreamBasicDescription), (fill_indesc_mp3), (fill_indesc_aac), (make_samr_magic_cookie), (write_len), (make_aac_magic_cookie), (open_decoder), (process_buffer_cb), (qtwrapper_audio_decoder_chain), (qtwrapper_audio_decoder_sink_event), (qtwrapper_audio_decoder_base_init), (qtwrapper_audio_decoder_class_init), (qtwrapper_audio_decoders_register): * sys/qtwrapper/codecmapping.h: * sys/qtwrapper/imagedescription.c: (image_description_for_avc1), (image_description_for_mp4v), (image_description_from_stsd_buffer): * sys/qtwrapper/imagedescription.h: * sys/qtwrapper/qtutils.c: (get_name_info_from_component), (dump_avcc_atom), (dump_image_description), (AllocateAudioBufferList): * sys/qtwrapper/qtutils.h: * sys/qtwrapper/qtwrapper.c: (plugin_init): * sys/qtwrapper/qtwrapper.h: * sys/qtwrapper/videodecoders.c: (qtwrapper_video_decoder_base_init), (open_decoder), (decompressCb), (qtwrapper_video_decoder_chain), (qtwrapper_video_decoders_register): Make qtwrapper compile/work on win32. Lots of fixes Fixes #531840
Diffstat (limited to 'sys/qtwrapper/imagedescription.c')
-rw-r--r--sys/qtwrapper/imagedescription.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/qtwrapper/imagedescription.c b/sys/qtwrapper/imagedescription.c
index 7cdf3990..eb52ebfa 100644
--- a/sys/qtwrapper/imagedescription.c
+++ b/sys/qtwrapper/imagedescription.c
@@ -42,16 +42,18 @@
* Boston, MA 02111-1307, USA.
*/
+#include <string.h>
+
#include "imagedescription.h"
static ImageDescription *
image_description_for_avc1 (GstBuffer * buf)
{
ImageDescription *desc = NULL;
- gpointer pos;
+ guint8 *pos;
desc = g_malloc0 (sizeof (ImageDescription) + GST_BUFFER_SIZE (buf) + 8);
- pos = (gpointer) ((gulong) desc + (gulong) sizeof (ImageDescription));
+ pos = (guint8 *) desc + sizeof (ImageDescription);
desc->idSize = sizeof (ImageDescription) + GST_BUFFER_SIZE (buf) + 8;
/* write size in Big-Endian */
@@ -74,7 +76,7 @@ image_description_for_mp4v (GstBuffer * buf)
{
ImageDescription *desc = NULL;
guint32 offset = sizeof (ImageDescription);
- gpointer location;
+ guint8 *location;
GST_LOG ("buf %p , size:%d", buf, GST_BUFFER_SIZE (buf));
@@ -88,7 +90,7 @@ image_description_for_mp4v (GstBuffer * buf)
desc = g_malloc0 (offset + 37 + GST_BUFFER_SIZE (buf));
desc->idSize = offset + 37 + GST_BUFFER_SIZE (buf);
- location = (gpointer) ((gulong) desc + (gulong) offset);
+ location = (guint8 *) desc + offset;
/* Fill in ESDS */
/* size */
@@ -137,8 +139,9 @@ static ImageDescription *
image_description_from_stsd_buffer (GstBuffer * buf)
{
ImageDescription *desc = NULL;
- gpointer content;
- guint size, imds;
+ guint8 *content;
+ guint size;
+ gint imds;
GST_LOG ("buffer %p, size:%u", buf, GST_BUFFER_SIZE (buf));
@@ -171,8 +174,7 @@ image_description_from_stsd_buffer (GstBuffer * buf)
if (desc->idSize > imds) {
GST_LOG ("Copying %d bytes from %p to %p",
size - imds, content + imds, desc + imds);
- memcpy ((gpointer) ((gulong) desc + imds),
- (gpointer) ((gulong) content + imds), size - imds);
+ memcpy ((guint8 *) desc + imds, (guint8 *) content + imds, size - imds);
}
#if DEBUG_DUMP
GST_LOG ("outgoing data in machine-endian");