Home | History | Annotate | Download | only in base

Lines Matching defs:codec

54   enum Codec {
120 CodecEntry() : codec(INVALID_CODEC), is_ambiguous(true) {}
121 CodecEntry(Codec c, bool ambiguous) : codec(c), is_ambiguous(ambiguous) {}
122 Codec codec;
129 // Returns IsSupported if all codec IDs in |codecs| are unambiguous
131 // at least one codec ID in |codecs| is ambiguous but all the codecs
133 // least one codec ID is not supported by the platform.
145 // Converts a codec ID into an Codec enum value and indicates
148 // Codec enum value. |codec| and |is_ambiguous| are only valid if true
151 // unambiguously determine the proper Codec enum value. If |is_ambiguous|
152 // is true |codec| contains the best guess for the intended Codec enum value.
154 Codec* codec,
157 // Returns true if |codec| is supported by the platform.
160 bool IsCodecSupported(Codec codec) const;
162 // Returns true if |codec| refers to a proprietary codec.
163 bool IsCodecProprietary(Codec codec) const;
166 // default codec associated with it.
169 Codec* default_codec) const;
171 // Returns true if |mime_type| has a default codec associated with it
172 // and IsCodecSupported() returns true for that particular codec.
184 // Keeps track of whether proprietary codec support should be
188 // Lookup table for string compare based string -> Codec mappings.
470 static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) {
471 switch (codec) {
563 MimeUtil::Codec codec;
566 // List of codec IDs that provide enough information to determine the
567 // codec and profile being requested.
589 // List of codec IDs that are ambiguous and don't provide
590 // enough information to determine the codec and profile.
591 // The codec in these entries indicate the codec and profile
612 Codec codec = INVALID_CODEC;
613 if (!StringToCodec(codecs[i], &codec, &is_ambiguous))
616 if (!IsCodecSupported(codec) ||
617 supported_codecs.find(codec) == supported_codecs.end()) {
673 CodecEntry(kUnambiguousCodecIDs[i].codec, false);
678 CodecEntry(kAmbiguousCodecIDs[i].codec, true);
690 Codec codec = INVALID_CODEC;
692 CHECK(StringToCodec(mime_type_codecs[j], &codec, &is_ambiguous));
694 codecs.insert(codec);
856 Codec codec = INVALID_CODEC;
858 if (!StringToCodec(codecs[i], &codec, &is_ambiguous) ||
859 !IsCodecSupported(codec)) {
906 // but didn't get one. If |mime_type| does not have a default codec
909 Codec default_codec = INVALID_CODEC;
974 // Handle parsing H.264 codec IDs as outlined in RFC 6381 and ISO-14496-10.
985 MimeUtil::Codec* codec,
996 *codec = MimeUtil::H264_BASELINE;
998 *codec = MimeUtil::H264_MAIN;
1000 *codec = MimeUtil::H264_HIGH;
1002 *codec = MimeUtil::H264_BASELINE;
1012 Codec* codec,
1017 *codec = itr->second.codec;
1023 // an H.264 codec ID because currently those are the only ones that can't be
1025 return ParseH264CodecID(codec_id, codec, is_ambiguous);
1028 bool MimeUtil::IsCodecSupported(Codec codec) const {
1029 DCHECK_NE(codec, INVALID_CODEC);
1032 if (!IsCodecSupportedOnAndroid(codec))
1036 return allow_proprietary_codecs_ || !IsCodecProprietary(codec);
1039 bool MimeUtil::IsCodecProprietary(Codec codec) const {
1040 switch (codec) {
1066 Codec* default_codec) const {
1079 Codec default_codec = Codec::INVALID_CODEC;