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

Side by Side Diff: media/blink/webmediaplayer_impl.h

Issue 1735803002: Implemented passing media track info from ffmpeg into blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wolenetz@ CR feedback + better track info extraction in ffmpeg Created 4 years, 10 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
« no previous file with comments | « media/base/stream_parser.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/linked_ptr.h" 15 #include "base/memory/linked_ptr.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/threading/thread.h" 19 #include "base/threading/thread.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "media/base/media_tracks.h"
21 #include "media/base/pipeline_impl.h" 22 #include "media/base/pipeline_impl.h"
22 #include "media/base/renderer_factory.h" 23 #include "media/base/renderer_factory.h"
23 #include "media/base/surface_manager.h" 24 #include "media/base/surface_manager.h"
24 #include "media/base/text_track.h" 25 #include "media/base/text_track.h"
25 #include "media/blink/buffered_data_source.h" 26 #include "media/blink/buffered_data_source.h"
26 #include "media/blink/buffered_data_source_host_impl.h" 27 #include "media/blink/buffered_data_source_host_impl.h"
27 #include "media/blink/media_blink_export.h" 28 #include "media/blink/media_blink_export.h"
28 #include "media/blink/multibuffer_data_source.h" 29 #include "media/blink/multibuffer_data_source.h"
29 #include "media/blink/video_frame_compositor.h" 30 #include "media/blink/video_frame_compositor.h"
30 #include "media/blink/webmediaplayer_delegate.h" 31 #include "media/blink/webmediaplayer_delegate.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 void FrameReady(const scoped_refptr<VideoFrame>& frame); 255 void FrameReady(const scoped_refptr<VideoFrame>& frame);
255 256
256 // Returns the current video frame from |compositor_|. Blocks until the 257 // Returns the current video frame from |compositor_|. Blocks until the
257 // compositor can return the frame. 258 // compositor can return the frame.
258 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); 259 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor();
259 260
260 // Called when the demuxer encounters encrypted streams. 261 // Called when the demuxer encounters encrypted streams.
261 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, 262 void OnEncryptedMediaInitData(EmeInitDataType init_data_type,
262 const std::vector<uint8_t>& init_data); 263 const std::vector<uint8_t>& init_data);
263 264
265 // Called when the demuxer encounters new media tracks.
266 void OnMediaTracksUpdated(scoped_ptr<MediaTracks> tracks);
267
264 // Called when a decoder detects that the key needed to decrypt the stream 268 // Called when a decoder detects that the key needed to decrypt the stream
265 // is not available. 269 // is not available.
266 void OnWaitingForDecryptionKey(); 270 void OnWaitingForDecryptionKey();
267 271
268 // Sets |cdm_context| on the pipeline and fires |cdm_attached_cb| when done. 272 // Sets |cdm_context| on the pipeline and fires |cdm_attached_cb| when done.
269 // Parameter order is reversed for easy binding. 273 // Parameter order is reversed for easy binding.
270 void SetCdm(const CdmAttachedCB& cdm_attached_cb, CdmContext* cdm_context); 274 void SetCdm(const CdmAttachedCB& cdm_attached_cb, CdmContext* cdm_context);
271 275
272 // Called when a CDM has been attached to the |pipeline_|. 276 // Called when a CDM has been attached to the |pipeline_|.
273 void OnCdmAttached(bool success); 277 void OnCdmAttached(bool success);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // for a transient sound. Playout volume is derived by volume * multiplier. 451 // for a transient sound. Playout volume is derived by volume * multiplier.
448 double volume_; 452 double volume_;
449 double volume_multiplier_; 453 double volume_multiplier_;
450 454
451 scoped_ptr<RendererFactory> renderer_factory_; 455 scoped_ptr<RendererFactory> renderer_factory_;
452 456
453 // For requesting surfaces on behalf of the Android H/W decoder in fullscreen. 457 // For requesting surfaces on behalf of the Android H/W decoder in fullscreen.
454 // This will be null everywhere but Android. 458 // This will be null everywhere but Android.
455 SurfaceManager* surface_manager_; 459 SurfaceManager* surface_manager_;
456 460
461 std::vector<blink::WebMediaPlayer::TrackId> blink_audio_tracks_;
462 std::vector<blink::WebMediaPlayer::TrackId> blink_video_tracks_;
463
457 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 464 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
458 }; 465 };
459 466
460 } // namespace media 467 } // namespace media
461 468
462 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 469 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/base/stream_parser.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698