diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-24 03:50:55 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-24 03:50:55 +0000 |
commit | a5f078461ddae8dd50a68dccfbd2c31882cb62d5 (patch) | |
tree | c831d4e2a7af5f91ca21ccc1019ccbde87fe02c2 /media/webm/webm_content_encodings.h | |
parent | a58fec2f838877199288d1756b4ac55aeafd4794 (diff) | |
download | chromium_src-a5f078461ddae8dd50a68dccfbd2c31882cb62d5.zip chromium_src-a5f078461ddae8dd50a68dccfbd2c31882cb62d5.tar.gz chromium_src-a5f078461ddae8dd50a68dccfbd2c31882cb62d5.tar.bz2 |
Add content encoding support to WebM demuxer.
BUG=none
TEST=passed media_unittests
Review URL: http://codereview.chromium.org/9084002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/webm/webm_content_encodings.h')
-rw-r--r-- | media/webm/webm_content_encodings.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/media/webm/webm_content_encodings.h b/media/webm/webm_content_encodings.h new file mode 100644 index 0000000..4a5f62f --- /dev/null +++ b/media/webm/webm_content_encodings.h @@ -0,0 +1,65 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ +#define MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ + +#include <vector> + +#include "base/compiler_specific.h" +#include "base/memory/ref_counted.h" +#include "base/memory/scoped_ptr.h" +#include "media/base/media_export.h" + +namespace media { + +struct MEDIA_EXPORT ContentEncoding : public base::RefCounted<ContentEncoding> { + // The following enum definitions are based on the ContentEncoding element + // specified in the Matroska spec. + + static const int kOrderInvalid = -1; + + enum Scope { + kScopeInvalid = 0, + kScopeAllFrameContents = 1, + kScopeTrackPrivateData = 2, + kScopeNextContentEncodingData = 4, + kScopeMax = 7, + }; + + enum Type { + kTypeInvalid = -1, + kTypeCompression = 0, + kTypeEncryption = 1, + }; + + enum EncryptionAlgo { + kEncAlgoInvalid = -1, + kEncAlgoNotEncrypted = 0, + kEncAlgoDes = 1, + kEncAlgo3des = 2, + kEncAlgoTwofish = 3, + kEncAlgoBlowfish = 4, + kEncAlgoAes = 5, + }; + + ContentEncoding(); + virtual ~ContentEncoding(); + + int64 order_; + Scope scope_; + Type type_; + EncryptionAlgo encryption_algo_; + scoped_array<uint8> encryption_key_id_; + int encryption_key_id_size_; + + private: + DISALLOW_COPY_AND_ASSIGN(ContentEncoding); +}; + +typedef std::vector<scoped_refptr<ContentEncoding> > ContentEncodings; + +} // namespace media + +#endif // MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ |