/src/mozilla-central/dom/media/ogg/OggCodecStore.cpp
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #include "mozilla/DebugOnly.h" |
8 | | |
9 | | #include "OggCodecStore.h" |
10 | | |
11 | | namespace mozilla { |
12 | | |
13 | | OggCodecStore::OggCodecStore() |
14 | | : mMonitor("CodecStore") |
15 | 0 | { |
16 | 0 | } |
17 | | |
18 | | void OggCodecStore::Add(uint32_t serial, OggCodecState* codecState) |
19 | 0 | { |
20 | 0 | MonitorAutoLock mon(mMonitor); |
21 | 0 | mCodecStates.Put(serial, codecState); |
22 | 0 | } |
23 | | |
24 | | bool OggCodecStore::Contains(uint32_t serial) |
25 | 0 | { |
26 | 0 | MonitorAutoLock mon(mMonitor); |
27 | 0 | return mCodecStates.Get(serial, nullptr); |
28 | 0 | } |
29 | | |
30 | | OggCodecState* OggCodecStore::Get(uint32_t serial) |
31 | 0 | { |
32 | 0 | MonitorAutoLock mon(mMonitor); |
33 | 0 | return mCodecStates.Get(serial); |
34 | 0 | } |
35 | | |
36 | | } // namespace mozilla |
37 | | |