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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // AVCodecContext for the stream sourcing these packets. A reference to | 62 // AVCodecContext for the stream sourcing these packets. A reference to |
63 // |stream_context| is retained, so it must outlive this class. | 63 // |stream_context| is retained, so it must outlive this class. |
64 FFmpegBitstreamConverter(const std::string& filter_name, | 64 FFmpegBitstreamConverter(const std::string& filter_name, |
65 AVCodecContext* stream_context); | 65 AVCodecContext* stream_context); |
66 virtual ~FFmpegBitstreamConverter(); | 66 virtual ~FFmpegBitstreamConverter(); |
67 | 67 |
68 virtual bool Initialize(); | 68 virtual bool Initialize(); |
69 virtual bool ConvertPacket(AVPacket* packet); | 69 virtual bool ConvertPacket(AVPacket* packet); |
70 | 70 |
71 private: | 71 private: |
72 FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, ConvertPacket_FailedFilter); | |
73 FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, ConvertPacket_Success); | |
74 FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, | |
75 ConvertPacket_SuccessInPlace); | |
76 | |
77 std::string filter_name_; | 72 std::string filter_name_; |
78 AVBitStreamFilterContext* stream_filter_; | 73 AVBitStreamFilterContext* stream_filter_; |
79 AVCodecContext* stream_context_; | 74 AVCodecContext* stream_context_; |
80 | 75 |
81 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter); | 76 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter); |
82 }; | 77 }; |
83 | 78 |
84 } // namespace media | 79 } // namespace media |
85 | 80 |
86 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ | 81 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ |
OLD | NEW |