Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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/. */
6 :
7 : #include "BufferDecoder.h"
8 :
9 : #include "nsISupports.h"
10 : #include "MediaResource.h"
11 :
12 : namespace mozilla {
13 :
14 0 : NS_IMPL_ISUPPORTS0(BufferDecoder)
15 :
16 0 : BufferDecoder::BufferDecoder(MediaResource* aResource,
17 0 : AbstractThread* aMainThread)
18 : : mResource(aResource)
19 0 : , mAbstractMainThread(aMainThread)
20 : {
21 0 : MOZ_ASSERT(NS_IsMainThread());
22 0 : }
23 :
24 0 : BufferDecoder::~BufferDecoder()
25 : {
26 : // The dtor may run on any thread, we cannot be sure.
27 0 : }
28 :
29 : void
30 0 : BufferDecoder::BeginDecoding(TaskQueue* aTaskQueueIdentity)
31 : {
32 0 : MOZ_ASSERT(!mTaskQueueIdentity && aTaskQueueIdentity);
33 0 : mTaskQueueIdentity = aTaskQueueIdentity;
34 0 : }
35 :
36 : void
37 0 : BufferDecoder::NotifyDecodedFrames(const FrameStatisticsData& aStats)
38 : {
39 : // ignore
40 0 : }
41 :
42 : VideoFrameContainer*
43 0 : BufferDecoder::GetVideoFrameContainer()
44 : {
45 : // no video frame
46 0 : return nullptr;
47 : }
48 :
49 : layers::ImageContainer*
50 0 : BufferDecoder::GetImageContainer()
51 : {
52 : // no image container
53 0 : return nullptr;
54 : }
55 :
56 : MediaDecoderOwner*
57 0 : BufferDecoder::GetOwner() const
58 : {
59 : // unknown
60 0 : return nullptr;
61 : }
62 :
63 : AbstractThread*
64 0 : BufferDecoder::AbstractMainThread() const
65 : {
66 0 : return mAbstractMainThread;
67 : }
68 :
69 : } // namespace mozilla
|