OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Interface and some concrete classes for applying various transforms | 5 // Interface and some concrete classes for applying various transforms |
6 // to AVPackets. FFmpegBitstreamConverter, in particular, can be used | 6 // to AVPackets. FFmpegBitstreamConverter, in particular, can be used |
7 // to apply FFmpeg bitstream filters to the incoming AVPacket to transcode | 7 // to apply FFmpeg bitstream filters to the incoming AVPacket to transcode |
8 // the packet format. | 8 // the packet format. |
9 | 9 |
10 #ifndef MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ | 10 #ifndef MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 private: | 35 private: |
36 DISALLOW_COPY_AND_ASSIGN(BitstreamConverter); | 36 DISALLOW_COPY_AND_ASSIGN(BitstreamConverter); |
37 }; | 37 }; |
38 | 38 |
39 class IdentityBitstreamConverter : public BitstreamConverter { | 39 class IdentityBitstreamConverter : public BitstreamConverter { |
40 public: | 40 public: |
41 IdentityBitstreamConverter() {} | 41 IdentityBitstreamConverter() {} |
42 virtual ~IdentityBitstreamConverter() {} | 42 virtual ~IdentityBitstreamConverter() {} |
43 | 43 |
44 virtual bool Initialize() { return true; } | 44 virtual bool Initialize(); |
45 virtual bool ConvertPacket(AVPacket* packet) { return true; } | 45 virtual bool ConvertPacket(AVPacket* packet); |
46 | 46 |
47 private: | 47 private: |
48 DISALLOW_COPY_AND_ASSIGN(IdentityBitstreamConverter); | 48 DISALLOW_COPY_AND_ASSIGN(IdentityBitstreamConverter); |
49 }; | 49 }; |
50 | 50 |
51 class FFmpegBitstreamConverter : public BitstreamConverter { | 51 class FFmpegBitstreamConverter : public BitstreamConverter { |
52 public: | 52 public: |
53 // Creates FFmpegBitstreamConverter based on the FFmpeg bistream filter | 53 // Creates FFmpegBitstreamConverter based on the FFmpeg bistream filter |
54 // corresponding to |filter_name|. | 54 // corresponding to |filter_name|. |
55 // | 55 // |
(...skipping 16 matching lines...) Expand all Loading... |
72 std::string filter_name_; | 72 std::string filter_name_; |
73 AVBitStreamFilterContext* stream_filter_; | 73 AVBitStreamFilterContext* stream_filter_; |
74 AVCodecContext* stream_context_; | 74 AVCodecContext* stream_context_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter); | 76 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace media | 79 } // namespace media |
80 | 80 |
81 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ | 81 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ |
OLD | NEW |