Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: media/webm/webm_stream_parser.cc

Issue 10829470: Support for parsing encrypted WebM streams by src. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tool player_x11 Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/webm/webm_crypto_helpers.cc ('k') | webkit/media/filter_helpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/webm/webm_stream_parser.cc
diff --git a/media/webm/webm_stream_parser.cc b/media/webm/webm_stream_parser.cc
index db854a9fff7567bbb1d90e41980678eacc21c7d7..a43120efa8b3802833453bf80f289718a2757602 100644
--- a/media/webm/webm_stream_parser.cc
+++ b/media/webm/webm_stream_parser.cc
@@ -14,14 +14,12 @@
#include "media/webm/webm_cluster_parser.h"
#include "media/webm/webm_constants.h"
#include "media/webm/webm_content_encodings.h"
+#include "media/webm/webm_crypto_helpers.h"
#include "media/webm/webm_info_parser.h"
#include "media/webm/webm_tracks_parser.h"
namespace media {
-// TODO(xhwang): Figure out the init data type appropriately once it's spec'ed.
-static const char kWebMInitDataType[] = "video/webm";
-
// Helper class that uses FFmpeg to create AudioDecoderConfig &
// VideoDecoderConfig objects.
//
@@ -150,13 +148,12 @@ bool FFmpegConfigHelper::SetupStreamConfigs() {
bool no_supported_streams = true;
for (size_t i = 0; i < format_context->nb_streams; ++i) {
AVStream* stream = format_context->streams[i];
- AVCodecContext* codec_context = stream->codec;
- AVMediaType codec_type = codec_context->codec_type;
+ AVMediaType codec_type = stream->codec->codec_type;
if (codec_type == AVMEDIA_TYPE_AUDIO &&
stream->codec->codec_id == CODEC_ID_VORBIS &&
!audio_config_.IsValidConfig()) {
- AVCodecContextToAudioDecoderConfig(stream->codec, &audio_config_);
+ AVStreamToAudioDecoderConfig(stream, &audio_config_);
no_supported_streams = false;
continue;
}
@@ -473,7 +470,7 @@ void WebMStreamParser::FireNeedKey(const std::string& key_id) {
DCHECK_GT(key_id_size, 0);
scoped_array<uint8> key_id_array(new uint8[key_id_size]);
memcpy(key_id_array.get(), key_id.data(), key_id_size);
- need_key_cb_.Run(kWebMInitDataType, key_id_array.Pass(), key_id_size);
+ need_key_cb_.Run(kWebMEncryptInitDataType, key_id_array.Pass(), key_id_size);
}
} // namespace media
« no previous file with comments | « media/webm/webm_crypto_helpers.cc ('k') | webkit/media/filter_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698