From ba48156d08fc80ce8d63a4ec071b2c1ab6624db9 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 1 Jul 2008 11:28:17 +0000 Subject: sys/qtwrapper/: Make qtwrapper compile/work on win32. Original commit message from CVS: Patch by : Michael Smith * 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 --- sys/qtwrapper/qtwrapper.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sys/qtwrapper/qtwrapper.c') 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 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; -- cgit v1.2.1