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

Side by Side Diff: media/base/pipeline.h

Issue 9325044: Remove AudioDecoder from the Filter heirarchy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | 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 #ifndef MEDIA_BASE_PIPELINE_H_ 5 #ifndef MEDIA_BASE_PIPELINE_H_
6 #define MEDIA_BASE_PIPELINE_H_ 6 #define MEDIA_BASE_PIPELINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 17 matching lines...) Expand all
28 28
29 class AudioDecoder; 29 class AudioDecoder;
30 class AudioRenderer; 30 class AudioRenderer;
31 class Clock; 31 class Clock;
32 class Filter; 32 class Filter;
33 class FilterCollection; 33 class FilterCollection;
34 class MediaLog; 34 class MediaLog;
35 class VideoDecoder; 35 class VideoDecoder;
36 class VideoRenderer; 36 class VideoRenderer;
37 37
38 // TODO(scherkus): this should be moved alongside host interface defintions.
39 struct PipelineStatistics {
40 PipelineStatistics()
41 : audio_bytes_decoded(0),
42 video_bytes_decoded(0),
43 video_frames_decoded(0),
44 video_frames_dropped(0) {
45 }
46
47 uint32 audio_bytes_decoded; // Should be uint64?
48 uint32 video_bytes_decoded; // Should be uint64?
49 uint32 video_frames_decoded;
50 uint32 video_frames_dropped;
51 };
52
53 enum NetworkEvent { 38 enum NetworkEvent {
54 DOWNLOAD_CONTINUED, 39 DOWNLOAD_CONTINUED,
55 DOWNLOAD_PAUSED, 40 DOWNLOAD_PAUSED,
56 CAN_PLAY_THROUGH 41 CAN_PLAY_THROUGH
57 }; 42 };
58 43
59 // Callback that executes when a network event occurs. 44 // Callback that executes when a network event occurs.
60 // The parameter specifies the type of event that is being signalled. 45 // The parameter specifies the type of event that is being signalled.
61 typedef base::Callback<void(NetworkEvent)> NetworkEventCB; 46 typedef base::Callback<void(NetworkEvent)> NetworkEventCB;
62 47
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 589
605 // Callbacks for various pipeline operations. 590 // Callbacks for various pipeline operations.
606 PipelineStatusCB seek_callback_; 591 PipelineStatusCB seek_callback_;
607 PipelineStatusCB stop_callback_; 592 PipelineStatusCB stop_callback_;
608 PipelineStatusCB ended_callback_; 593 PipelineStatusCB ended_callback_;
609 PipelineStatusCB error_callback_; 594 PipelineStatusCB error_callback_;
610 NetworkEventCB network_callback_; 595 NetworkEventCB network_callback_;
611 596
612 // Reference to the filter(s) that constitute the pipeline. 597 // Reference to the filter(s) that constitute the pipeline.
613 scoped_refptr<Filter> pipeline_filter_; 598 scoped_refptr<Filter> pipeline_filter_;
599 scoped_refptr<AudioDecoder> audio_decoder_;
614 600
615 // Decoder reference used for signalling imminent shutdown. 601 // Decoder reference used for signalling imminent shutdown.
616 // This is a HACK necessary because WebMediaPlayerImpl::Destroy() holds the 602 // This is a HACK necessary because WebMediaPlayerImpl::Destroy() holds the
617 // renderer thread loop hostage for until PipelineImpl::Stop() calls its 603 // renderer thread loop hostage for until PipelineImpl::Stop() calls its
618 // callback. http://crbug.com/110228 tracks removing this hack. 604 // callback. http://crbug.com/110228 tracks removing this hack.
619 scoped_refptr<VideoDecoder> video_decoder_; 605 scoped_refptr<VideoDecoder> video_decoder_;
620 606
621 // Renderer references used for setting the volume and determining 607 // Renderer references used for setting the volume and determining
622 // when playback has finished. 608 // when playback has finished.
623 scoped_refptr<AudioRenderer> audio_renderer_; 609 scoped_refptr<AudioRenderer> audio_renderer_;
(...skipping 18 matching lines...) Expand all
642 628
643 // True if the pipeline is actively downloading bytes, false otherwise. 629 // True if the pipeline is actively downloading bytes, false otherwise.
644 bool is_downloading_data_; 630 bool is_downloading_data_;
645 631
646 DISALLOW_COPY_AND_ASSIGN(Pipeline); 632 DISALLOW_COPY_AND_ASSIGN(Pipeline);
647 }; 633 };
648 634
649 } // namespace media 635 } // namespace media
650 636
651 #endif // MEDIA_BASE_PIPELINE_H_ 637 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698