| OLD | NEW |
| 1 // Copyright (c) 2011 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_ |
| 11 #define MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ | 11 #define MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ |
| (...skipping 50 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 |
| 72 std::string filter_name_; | 77 std::string filter_name_; |
| 73 AVBitStreamFilterContext* stream_filter_; | 78 AVBitStreamFilterContext* stream_filter_; |
| 74 AVCodecContext* stream_context_; | 79 AVCodecContext* stream_context_; |
| 75 | 80 |
| 76 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter); | 81 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter); |
| 77 }; | 82 }; |
| 78 | 83 |
| 79 } // namespace media | 84 } // namespace media |
| 80 | 85 |
| 81 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ | 86 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ |
| OLD | NEW |