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

Side by Side Diff: services/media/framework_ffmpeg/ffmpeg_audio_decoder.h

Issue 1814553002: Motown: Improvements to packet definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added a comment. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_AUDIO_DECODER_H_ 5 #ifndef SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_AUDIO_DECODER_H_
6 #define SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_AUDIO_DECODER_H_ 6 #define SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_AUDIO_DECODER_H_
7 7
8 #include "services/media/framework/lpcm_util.h" 8 #include "services/media/framework/lpcm_util.h"
9 #include "services/media/framework_ffmpeg/ffmpeg_decoder_base.h" 9 #include "services/media/framework_ffmpeg/ffmpeg_decoder_base.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 namespace media { 12 namespace media {
13 13
14 // Decoder implementation employing an ffmpeg audio decoder. 14 // Decoder implementation employing an ffmpeg audio decoder.
15 class FfmpegAudioDecoder : public FfmpegDecoderBase { 15 class FfmpegAudioDecoder : public FfmpegDecoderBase {
16 public: 16 public:
17 FfmpegAudioDecoder(AvCodecContextPtr av_codec_context); 17 FfmpegAudioDecoder(AvCodecContextPtr av_codec_context);
18 18
19 ~FfmpegAudioDecoder() override; 19 ~FfmpegAudioDecoder() override;
20 20
21 protected: 21 protected:
22 // FfmpegDecoderBase overrides. 22 // FfmpegDecoderBase overrides.
23 void Flush() override; 23 void Flush() override;
24 24
25 int Decode( 25 int Decode(
26 const AVPacket& av_packet, 26 const AVPacket& av_packet,
27 const AvFramePtr& av_frame_ptr, 27 const ffmpeg::AvFramePtr& av_frame_ptr,
28 PayloadAllocator* allocator, 28 PayloadAllocator* allocator,
29 bool* frame_decoded_out) override; 29 bool* frame_decoded_out) override;
30 30
31 PacketPtr CreateOutputPacket( 31 PacketPtr CreateOutputPacket(
32 const AVFrame& av_frame, 32 const AVFrame& av_frame,
33 PayloadAllocator* allocator) override; 33 PayloadAllocator* allocator) override;
34 34
35 PacketPtr CreateOutputEndOfStreamPacket() override; 35 PacketPtr CreateOutputEndOfStreamPacket() override;
36 36
37 private: 37 private:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // avcodec_decode_audio4. 105 // avcodec_decode_audio4.
106 PayloadAllocator* allocator_; 106 PayloadAllocator* allocator_;
107 107
108 // For interleaving, if needed. 108 // For interleaving, if needed.
109 std::unique_ptr<LpcmUtil> lpcm_util_; 109 std::unique_ptr<LpcmUtil> lpcm_util_;
110 110
111 // For interleaving, if needed. 111 // For interleaving, if needed.
112 std::unique_ptr<StreamType> stream_type_; 112 std::unique_ptr<StreamType> stream_type_;
113 113
114 // Used to supply missing PTS. 114 // Used to supply missing PTS.
115 int64_t next_presentation_time_= Packet::kUnknownPresentationTime; 115 int64_t next_pts_= Packet::kUnknownPts;
116 }; 116 };
117 117
118 } // namespace media 118 } // namespace media
119 } // namespace mojo 119 } // namespace mojo
120 120
121 #endif // SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_AUDIO_DECODER_H_ 121 #endif // SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « services/media/framework_ffmpeg/av_packet.h ('k') | services/media/framework_ffmpeg/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698