Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef __FFmpegDecoderModule_h__
8 #define __FFmpegDecoderModule_h__
10 #include "PlatformDecoderModule.h"
12 namespace mozilla
13 {
15 #ifdef PR_LOGGING
16 extern PRLogModuleInfo* GetFFmpegDecoderLog();
17 #define FFMPEG_LOG(...) PR_LOG(GetFFmpegDecoderLog(), PR_LOG_DEBUG, (__VA_ARGS__))
18 #else
19 #define FFMPEG_LOG(...)
20 #endif
22 class FFmpegDecoderModule : public PlatformDecoderModule
23 {
24 public:
25 FFmpegDecoderModule();
26 virtual ~FFmpegDecoderModule();
28 static bool Link();
30 virtual nsresult Shutdown() MOZ_OVERRIDE;
32 virtual MediaDataDecoder* CreateH264Decoder(
33 const mp4_demuxer::VideoDecoderConfig& aConfig,
34 mozilla::layers::LayersBackend aLayersBackend,
35 mozilla::layers::ImageContainer* aImageContainer,
36 MediaTaskQueue* aVideoTaskQueue,
37 MediaDataDecoderCallback* aCallback) MOZ_OVERRIDE;
39 virtual MediaDataDecoder* CreateAACDecoder(
40 const mp4_demuxer::AudioDecoderConfig& aConfig,
41 MediaTaskQueue* aAudioTaskQueue,
42 MediaDataDecoderCallback* aCallback) MOZ_OVERRIDE;
44 private:
45 static bool sFFmpegLinkDone;
46 };
48 } // namespace mozilla
50 #endif // __FFmpegDecoderModule_h__