[vlc-devel] Re: [Patches] for vlc-0.9.0-svn
Jean-Paul Saman
jean-paul.saman at planet.nl
Tue Feb 27 09:17:33 CET 2007
xxcv wrote:
> Hello all,
> Here are some patches against trunk. I have only been building & testing
> for win32 platform.
None of these patches have any rationale. Please tell us what they are
supposed to accomplish.
>
>
> ------------------------------------------------------------------------
>
> --- /home/slack/VLC_SVN/modules/stream_out/transcode.c 2006-12-31 14:51:31.000000000 +1100
> +++ modules/stream_out/transcode.c 2007-01-13 22:55:24.000000000 +1100
> @@ -1306,7 +1306,7 @@
> audio_BitsPerSample( id->p_decoder->fmt_out.i_codec );
> fmt_last = id->p_decoder->fmt_out;
> /* FIX decoders so we don't have to do this */
> - fmt_last.audio.i_rate = id->p_decoder->fmt_in.audio.i_rate;
> +// fmt_last.audio.i_rate = id->p_decoder->fmt_in.audio.i_rate;
I am not sure about the effect of the change above. I would love to see
it only limited to the case AAC transcode where it is reported to work.
>
> /*
> * Open encoder
> @@ -1345,6 +1345,15 @@
> id->p_encoder->fmt_in.audio.i_bitspersample =
> audio_BitsPerSample( id->p_encoder->fmt_in.i_codec );
>
> + /* Fix AAC SBR changing number of channels and sampling rate */
> + if( (id->p_decoder->fmt_in.i_codec == VLC_FOURCC('m','p','4','a')) &&
> + (fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate) &&
> + (fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels) )
> + {
> + id->p_encoder->fmt_in.audio.i_rate = fmt_last.audio.i_rate;
> + id->p_encoder->fmt_out.audio.i_rate = fmt_last.audio.i_rate;
> + }
> +
no comments on this.
> /* Load conversion filters */
> if( fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels ||
> fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate )
>
>
> ------------------------------------------------------------------------
>
> --- modules/access/vcd/cdrom_internals.h~ 2006-10-05 23:40:27.000000000 +1000
> +++ modules/access/vcd/cdrom_internals.h 2006-10-05 23:45:11.000000000 +1000
> @@ -25,6 +25,11 @@
> /*****************************************************************************
> * The vcddev structure
> *****************************************************************************/
> +#ifdef WIN32
> +typedef WINAPI DWORD (*GETASPI32SUPPORTINFO)(VOID);
> +typedef WINAPI DWORD (*SENDASPI32COMMAND)(LPVOID);
> +#endif
> +
> struct vcddev_s
> {
> char *psz_dev; /* vcd device name */
> @@ -40,7 +45,7 @@
> HANDLE h_device_handle; /* vcd device descriptor */
> long hASPI;
> short i_sid;
> - long (*lpSendCommand)( void* );
> + SENDASPI32COMMAND lpSendCommand;
>
> #else
> int i_device_handle; /* vcd device descriptor */
> --- modules/access/vcd/cdrom.c~ 2006-11-23 15:03:42.000000000 +1100
> +++ modules/access/vcd/cdrom.c 2006-11-23 15:03:49.000000000 +1100
> @@ -1151,8 +1151,8 @@
> else
> {
> HMODULE hASPI = NULL;
> - long (*lpGetSupport)( void ) = NULL;
> - long (*lpSendCommand)( void* ) = NULL;
> + GETASPI32SUPPORTINFO lpGetSupport = NULL;
> + SENDASPI32COMMAND lpSendCommand = NULL;
> DWORD dwSupportInfo;
> int i, j, i_hostadapters;
> char c_drive = psz_dev[0];
> @@ -1160,9 +1160,9 @@
> hASPI = LoadLibrary( "wnaspi32.dll" );
> if( hASPI != NULL )
> {
> - (FARPROC) lpGetSupport = GetProcAddress( hASPI,
> + lpGetSupport = (GETASPI32SUPPORTINFO) GetProcAddress( hASPI,
> "GetASPI32SupportInfo" );
> - (FARPROC) lpSendCommand = GetProcAddress( hASPI,
> + lpSendCommand = (SENDASPI32COMMAND) GetProcAddress( hASPI,
> "SendASPI32Command" );
> }
>
>
>
> ------------------------------------------------------------------------
>
> --- modules/codec/dmo/dmo.h~ 2006-10-06 02:56:09.000000000 +1000
> +++ modules/codec/dmo/dmo.h 2006-10-06 03:20:42.000000000 +1000
> @@ -21,8 +21,8 @@
> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
> *****************************************************************************/
>
> -static const GUID IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46}};
> -static const GUID IID_IClassFactory = {0x00000001, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
> +const GUID IID_IUnknown;
> +const GUID IID_IClassFactory;
Why remove static and GUID here?
> static const GUID IID_IWMCodecPrivateData = {0x73f0be8e, 0x57f7, 0x4f01, {0xaa, 0x66, 0x9f, 0x57, 0x34, 0xc, 0xfe, 0xe}};
> static const GUID IID_IMediaObject = {0xd8ad0f58, 0x5494, 0x4102, {0x97, 0xc5, 0xec, 0x79, 0x8e, 0x59, 0xbc, 0xf4}};
> static const GUID IID_IMediaBuffer = {0x59eff8b9, 0x938c, 0x4a26, {0x82, 0xf2, 0x95, 0xcb, 0x84, 0xcd, 0xc8, 0x37}};
> @@ -31,7 +31,7 @@
> static const GUID MEDIASUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
> static const GUID FORMAT_VideoInfo = {0x05589f80, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
> static const GUID FORMAT_WaveFormatEx = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
> -static const GUID GUID_NULL = {0x0000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
> +const GUID GUID_NULL;
> static const GUID MEDIASUBTYPE_I420 = {0x30323449, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
> static const GUID MEDIASUBTYPE_YV12 = {0x32315659, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
> static const GUID MEDIASUBTYPE_RGB24 = {0xe436eb7d, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
> --- modules/codec/dmo/dmo.c~ 2006-11-28 15:28:54.000000000 +1100
> +++ modules/codec/dmo/dmo.c 2006-11-28 15:28:56.000000000 +1100
> @@ -49,6 +49,10 @@
> #include <vlc_codecs.h>
> #include "dmo.h"
>
> +const GUID IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46}};
> +const GUID IID_IClassFactory = {0x00000001, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
> +const GUID GUID_NULL = {0x0000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
> +
Why move them down from their original declaration? Why is the static
removed?
> //#define DMO_DEBUG 1
>
> #ifdef LOADER
>
>
> ------------------------------------------------------------------------
>
> --- modules/gui/wxwidgets/playlist_manager.cpp~ 2006-12-06 17:51:48.000000000 +1100
> +++ modules/gui/wxwidgets/playlist_manager.cpp 2006-12-06 17:52:31.000000000 +1100
> @@ -207,9 +207,9 @@
>
> wxCommandEvent event( wxEVT_PLAYLIST, UpdateItem_Event );
> event.SetInt( oval.i_int );
> - p_playlist->AddPendingEvent( event );
> + p_playlist->ProcessEvent( event );
> event.SetInt( nval.i_int );
> - p_playlist->AddPendingEvent( event );
> + p_playlist->ProcessEvent( event );
>
> return VLC_SUCCESS;
> }
> --- modules/gui/wxwidgets/dialogs/playlist.cpp~ 2006-12-06 12:26:25.000000000 +1100
> +++ modules/gui/wxwidgets/dialogs/playlist.cpp 2006-12-06 17:52:53.000000000 +1100
> @@ -1699,11 +1699,11 @@
>
> wxCommandEvent event( wxEVT_PLAYLIST, UpdateItem_Event );
> event.SetInt( oval.i_int );
> - p_playlist_dialog->AddPendingEvent( event );
> + p_playlist_dialog->ProcessEvent( event );
> event.SetInt( nval.i_int );
> - p_playlist_dialog->AddPendingEvent( event );
> + p_playlist_dialog->ProcessEvent( event );
>
> - return 0;
> + return VLC_SUCCESS;
> }
>
> /*****************************************************************************
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list