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

Side by Side Diff: webkit/media/webmediaplayer_impl.cc

Issue 10823300: Make ChunkDemuxer::SetTimestampOffset take a TimeDelta instead of double (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better solution Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/media/webmediaplayer_impl.h" 5 #include "webkit/media/webmediaplayer_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 680
681 float old_duration = duration(); 681 float old_duration = duration();
682 proxy_->DemuxerEndOfStream(pipeline_status); 682 proxy_->DemuxerEndOfStream(pipeline_status);
683 683
684 if (old_duration != duration()) 684 if (old_duration != duration())
685 GetClient()->durationChanged(); 685 GetClient()->durationChanged();
686 } 686 }
687 687
688 bool WebMediaPlayerImpl::sourceSetTimestampOffset(const WebKit::WebString& id, 688 bool WebMediaPlayerImpl::sourceSetTimestampOffset(const WebKit::WebString& id,
689 double offset) { 689 double offset) {
690 return proxy_->DemuxerSetTimestampOffset(id.utf8().data(), offset); 690 base::TimeDelta time_offset = base::TimeDelta::FromMicroseconds(
691 offset * base::Time::kMicrosecondsPerSecond);
Ami GONE FROM CHROMIUM 2012/08/14 02:00:44 I suspect this wants to use webmediaplayer_util.h,
vrk (LEFT CHROMIUM) 2012/08/14 23:30:25 OK, Not Done Yet.
692 return proxy_->DemuxerSetTimestampOffset(id.utf8().data(), time_offset);
691 } 693 }
692 694
693 WebKit::WebMediaPlayer::MediaKeyException 695 WebKit::WebMediaPlayer::MediaKeyException
694 WebMediaPlayerImpl::generateKeyRequest(const WebString& key_system, 696 WebMediaPlayerImpl::generateKeyRequest(const WebString& key_system,
695 const unsigned char* init_data, 697 const unsigned char* init_data,
696 unsigned init_data_length) { 698 unsigned init_data_length) {
697 if (!IsSupportedKeySystem(key_system)) 699 if (!IsSupportedKeySystem(key_system))
698 return WebKit::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; 700 return WebKit::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported;
699 701
700 // We do not support run-time switching between key systems for now. 702 // We do not support run-time switching between key systems for now.
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 return audio_source_provider_; 1032 return audio_source_provider_;
1031 } 1033 }
1032 1034
1033 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { 1035 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() {
1034 DCHECK_EQ(main_loop_, MessageLoop::current()); 1036 DCHECK_EQ(main_loop_, MessageLoop::current());
1035 incremented_externally_allocated_memory_ = true; 1037 incremented_externally_allocated_memory_ = true;
1036 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); 1038 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory);
1037 } 1039 }
1038 1040
1039 } // namespace webkit_media 1041 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698