Commit Graph

8 Commits

Author SHA1 Message Date
Benoit Jacob
15ef84b8b5 Bug 959448 - Convert most of LayersTypes.h to typed enums - r=nrc
find content/media dom/ipc widget/ gfx/tests gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)LAYERS_\(NONE\|BASIC\|OPENGL\|D3D9\|D3D10\|D3D11\|CLIENT\|LAST\)\($\|[^A-Za-z0-9_]\)/\1LayersBackend::LAYERS_\2\3/g'

find widget gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)BUFFER_\(NONE\)\($\|[^A-Za-z0-9_]\)/\1BufferMode::BUFFER_\2\3/g'

find widget gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)BUFFER_\(BUFFERED\)\($\|[^A-Za-z0-9_]\)/\1BufferMode::\2\3/g'

find gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)CLIP_\(DRAW\|DRAW_SNAPPED\)\($\|[^A-Za-z0-9_]\)/\1DrawRegionClip::\2\3/g'

find gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)CLIP_\(NONE\)\($\|[^A-Za-z0-9_]\)/\1DrawRegionClip::CLIP_\2\3/g'

find gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)SURFACE_\(NONE\|OPAQUE\|SINGLE_CHANNEL_ALPHA\|COMPONENT_ALPHA\)\($\|[^A-Za-z0-9_]\)/\1SurfaceMode::SURFACE_\2\3/g'

find gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)SCALE_\(STRETCH\|SENTINEL\)\($\|[^A-Za-z0-9_]\)/\1ScaleMode::\2\3/g'

find gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)SCALE_\(NONE\)\($\|[^A-Za-z0-9_]\)/\1ScaleMode::SCALE_\2\3/g'
2014-01-23 13:26:41 -05:00
Chris Pearce
f6c08a2043 Bug 959440 - Various cleanups in MP4Reader. r=kinetik
Change PlatformDecoderModule::Create*Decoder() to take an
mp4_demuxer::{Audio,Video}DecoderConfig parameter, instead of enumerating all
parameters. This means the platform decoders can have more data if need be,
like the AACAudioConfig.

Change MediaDataDecoder::Input() to take an nsAutoPtr<MP4Sample>&. The sample
will be deleted by the caller (MP4Reader) if Input() returns DECODE_STATUS_OK,
but if the MediaDataDecoder wants to assume responsibility of the
lifecycle of the sample (say to enqueue it), it can forget() on the
nsAutoPtr& passed in and assume responsibility.

Call PlatformDecoderModule::Create() on the decode thread. This is a step
towards making these classes decode-thread only.

Add PlatformDecoderModule::Init(), which caches the pref's we need, since
PlatformDecoderModule::Create() is no longer called on the main thread, we can
no longer access them in there.

Add Init() method to MediaDataDecoder interface. This is so that we can call
MediaDataDecoder::Shutdown() to unblock the initialization of a decoder, if
that init needs to block.

Pass LayersBackend type to WMFVideoDecoder, so it knows whether to init DXVA.
2014-01-15 16:13:54 +13:00
Wes Kocher
d8f87242ae Backed out 2 changesets (bug 959440) on an unrelated CLOSED TREE
Backed out changeset f4fd03805620 (bug 959440)
Backed out changeset bfee2bc18e55 (bug 959440)
2014-01-14 17:37:57 -08:00
Chris Pearce
1ade2536ed Bug 959440 - Various cleanups in MP4Reader. r=kinetik
Change PlatformDecoderModule::Create*Decoder() to take an
mp4_demuxer::{Audio,Video}DecoderConfig parameter, instead of enumerating all
parameters. This means the platform decoders can have more data if need be,
like the AACAudioConfig.

Change MediaDataDecoder::Input() to take an nsAutoPtr<MP4Sample>&. The sample
will be deleted by the caller (MP4Reader) if Input() returns DECODE_STATUS_OK,
but if the MediaDataDecoder wants to assume responsibility of the
lifecycle of the sample (say to enqueue it), it can forget() on the
nsAutoPtr& passed in and assume responsibility.

Call PlatformDecoderModule::Create() on the decode thread. This is a step
towards making these classes decode-thread only.

Add PlatformDecoderModule::Init(), which caches the pref's we need, since
PlatformDecoderModule::Create() is no longer called on the main thread, we can
no longer access them in there.

Add Init() method to MediaDataDecoder interface. This is so that we can call
MediaDataDecoder::Shutdown() to unblock the initialization of a decoder, if
that init needs to block.

Pass LayersBackend type to WMFVideoDecoder, so it knows whether to init DXVA.
2014-01-15 13:31:12 +13:00
Chris Pearce
32b24360e6 Bug 945085 - Improve comments in PlatformDecoderModule.h. r=kinetik
Adds comments to PlatformDecoderModule.h, and describes the call model
better. Renames CreateAudioDecoder and CreateVideoDecoder to
CreateAACDecoder and CreateH264Decoder. We may change them to accept a
codec parameter and have more general names in future when we need to
support more codecs here.
2013-12-04 13:47:12 +13:00
Chris Pearce
719365dddb Bug 943721 - Make MP4Reader restrict its codecs output to H.264 and AAC. r=kinetk
We should restrict the output of MP4Reader to H.264 and AAC so that we
don't end up invoking rogue platform decoders (if that's even possible).
This means that we won't play MP3 audio inside MP4, that's deliberate.
2013-11-28 11:12:24 +13:00
Chris Pearce
7577f98b66 Bug 944088 - Make MP4Reader::Init() assume mLayersBackendType=LAYERS_NONE if it doesn't have a decoder owner. r=kinetik
This ensures that if the MP4Reader fails to get a decoder owner, we
don't abort the media load, but instead we will assume that we don't
have an advanced layers backend, and so fallback to software decoding on
Windows.
2013-11-28 11:12:22 +13:00
Chris Pearce
7023a5d2e8 Bug 886196 - MP4 demuxing using Chromium's MP4 demuxer. No decoding yet. r=kinetik 2013-11-21 10:04:33 +13:00