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

Side by Side Diff: media/filters/ffmpeg_glue.h

Issue 2770293002: Detect HLS from demuxing results (Closed)
Patch Set: Minor changes in comments Created 3 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
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/ffmpeg_glue.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 (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 // FFmpegGlue is an interface between FFmpeg and Chrome used to proxy FFmpeg's 5 // FFmpegGlue is an interface between FFmpeg and Chrome used to proxy FFmpeg's
6 // read and seek requests to Chrome's internal data structures. The glue works 6 // read and seek requests to Chrome's internal data structures. The glue works
7 // through the AVIO interface provided by FFmpeg. 7 // through the AVIO interface provided by FFmpeg.
8 // 8 //
9 // AVIO works through a special AVIOContext created through avio_alloc_context() 9 // AVIO works through a special AVIOContext created through avio_alloc_context()
10 // which is attached to the AVFormatContext used for demuxing. The AVIO context 10 // which is attached to the AVFormatContext used for demuxing. The AVIO context
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // through the FFmpegURLProtocol provided during construction. 73 // through the FFmpegURLProtocol provided during construction.
74 bool OpenContext(); 74 bool OpenContext();
75 AVFormatContext* format_context() { return format_context_; } 75 AVFormatContext* format_context() { return format_context_; }
76 // Returns the container name. 76 // Returns the container name.
77 // Note that it is only available after calling OpenContext. 77 // Note that it is only available after calling OpenContext.
78 container_names::MediaContainerName container() const { 78 container_names::MediaContainerName container() const {
79 DCHECK(open_called_); 79 DCHECK(open_called_);
80 return container_; 80 return container_;
81 } 81 }
82 82
83 // Used on Android to switch to using the native MediaPlayer to play HLS.
84 bool detected_hls() { return detected_hls_; }
85
83 private: 86 private:
84 bool open_called_ = false; 87 bool open_called_ = false;
88 bool detected_hls_ = false;
85 AVFormatContext* format_context_ = nullptr; 89 AVFormatContext* format_context_ = nullptr;
86 std::unique_ptr<AVIOContext, ScopedPtrAVFree> avio_context_; 90 std::unique_ptr<AVIOContext, ScopedPtrAVFree> avio_context_;
87 container_names::MediaContainerName container_ = 91 container_names::MediaContainerName container_ =
88 container_names::CONTAINER_UNKNOWN; 92 container_names::CONTAINER_UNKNOWN;
89 93
90 DISALLOW_COPY_AND_ASSIGN(FFmpegGlue); 94 DISALLOW_COPY_AND_ASSIGN(FFmpegGlue);
91 }; 95 };
92 96
93 } // namespace media 97 } // namespace media
94 98
95 #endif // MEDIA_FILTERS_FFMPEG_GLUE_H_ 99 #endif // MEDIA_FILTERS_FFMPEG_GLUE_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/ffmpeg_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698