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

Unified Diff: media/base/filters.h

Issue 42635: Lots of files touched for a very simple change. Everywhere we used a const M... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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/base/factory.h ('k') | media/base/mock_media_filters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/filters.h
===================================================================
--- media/base/filters.h (revision 12568)
+++ media/base/filters.h (working copy)
@@ -97,9 +97,9 @@
return FILTER_DATA_SOURCE;
}
- static bool IsMediaFormatSupported(const MediaFormat* media_format) {
+ static bool IsMediaFormatSupported(const MediaFormat& media_format) {
std::string mime_type;
- return (media_format->GetAsString(MediaFormat::kMimeType, &mime_type) &&
+ return (media_format.GetAsString(MediaFormat::kMimeType, &mime_type) &&
mime_type == mime_type::kURL);
}
@@ -109,7 +109,7 @@
virtual bool Initialize(const std::string& url) = 0;
// Returns the MediaFormat for this filter.
- virtual const MediaFormat* GetMediaFormat() = 0;
+ virtual const MediaFormat& media_format() = 0;
// Read the given amount of bytes into data, returns the number of bytes read
// if successful, kReadError otherwise.
@@ -134,9 +134,9 @@
return FILTER_DEMUXER;
}
- static bool IsMediaFormatSupported(const MediaFormat* media_format) {
+ static bool IsMediaFormatSupported(const MediaFormat& media_format) {
std::string mime_type;
- return (media_format->GetAsString(MediaFormat::kMimeType, &mime_type) &&
+ return (media_format.GetAsString(MediaFormat::kMimeType, &mime_type) &&
mime_type == mime_type::kApplicationOctetStream);
}
@@ -154,7 +154,7 @@
class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> {
public:
// Returns the MediaFormat for this filter.
- virtual const MediaFormat* GetMediaFormat() = 0;
+ virtual const MediaFormat& media_format() = 0;
// Schedules a read and takes ownership of the given buffer.
virtual void Read(Assignable<Buffer>* buffer) = 0;
@@ -198,7 +198,7 @@
virtual bool Initialize(DemuxerStream* demuxer_stream) = 0;
// Returns the MediaFormat for this filter.
- virtual const MediaFormat* GetMediaFormat() = 0;
+ virtual const MediaFormat& media_format() = 0;
// Schedules a read and takes ownership of the given buffer.
virtual void Read(Assignable<VideoFrame>* video_frame) = 0;
@@ -219,7 +219,7 @@
virtual bool Initialize(DemuxerStream* demuxer_stream) = 0;
// Returns the MediaFormat for this filter.
- virtual const MediaFormat* GetMediaFormat() = 0;
+ virtual const MediaFormat& media_format() = 0;
// Schedules a read and takes ownership of the given buffer.
virtual void Read(Assignable<Buffer>* buffer) = 0;
« no previous file with comments | « media/base/factory.h ('k') | media/base/mock_media_filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698