summaryrefslogtreecommitdiffstats
path: root/sys/qtwrapper/qtwrapper.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/qtwrapper.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/qtwrapper.c')
-rw-r--r--sys/qtwrapper/qtwrapper.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/qtwrapper/qtwrapper.c b/sys/qtwrapper/qtwrapper.c
index ca4793e5..27e5c163 100644
--- a/sys/qtwrapper/qtwrapper.c
+++ b/sys/qtwrapper/qtwrapper.c
@@ -47,6 +47,7 @@
#endif
#include "qtwrapper.h"
+#include <stdio.h>
GST_DEBUG_CATEGORY (qtwrapper_debug);
@@ -54,11 +55,26 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
gboolean res;
+ OSErr status;
GST_DEBUG_CATEGORY_INIT (qtwrapper_debug, "qtwrapper",
0, "QuickTime codecs wrappers");
+ /* Initialize quicktime environment */
+#ifdef G_OS_WIN32
+ /* Only required on win32 */
+ InitializeQTML (0);
+#endif
+
+ status = EnterMovies ();
+ if (status) {
+ GST_ERROR ("Error initializing QuickTime environment: %d", status);
+ return FALSE;
+ }
+
+ GST_INFO ("Registering video decoders");
res = qtwrapper_video_decoders_register (plugin);
+ GST_INFO ("Registering audio decoders");
res &= qtwrapper_audio_decoders_register (plugin);
return res;