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

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

Issue 3064007: GTTF: more FRIEND_TEST_ALL_PREFIXES (Closed)
Patch Set: Created 10 years, 5 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/audio_renderer_algorithm_ola.h ('k') | media/filters/ffmpeg_demuxer.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/gtest_prod_util.h"
16 #include "base/logging.h" 17 #include "base/logging.h"
17 18
18 #include "testing/gtest/include/gtest/gtest_prod.h"
19
20 // FFmpeg types. 19 // FFmpeg types.
21 struct AVBitStreamFilterContext; 20 struct AVBitStreamFilterContext;
22 struct AVCodecContext; 21 struct AVCodecContext;
23 struct AVPacket; 22 struct AVPacket;
24 23
25 namespace media { 24 namespace media {
26 25
27 class BitstreamConverter { 26 class BitstreamConverter {
28 public: 27 public:
29 BitstreamConverter() {} 28 BitstreamConverter() {}
(...skipping 29 matching lines...) Expand all
59 // AVCodecContext for the stream sourcing these packets. A reference to 58 // AVCodecContext for the stream sourcing these packets. A reference to
60 // |stream_context| is retained, so it must outlive this class. 59 // |stream_context| is retained, so it must outlive this class.
61 FFmpegBitstreamConverter(const std::string& filter_name, 60 FFmpegBitstreamConverter(const std::string& filter_name,
62 AVCodecContext* stream_context); 61 AVCodecContext* stream_context);
63 virtual ~FFmpegBitstreamConverter(); 62 virtual ~FFmpegBitstreamConverter();
64 63
65 virtual bool Initialize(); 64 virtual bool Initialize();
66 virtual bool ConvertPacket(AVPacket* packet); 65 virtual bool ConvertPacket(AVPacket* packet);
67 66
68 private: 67 private:
69 FRIEND_TEST(BitstreamConverterTest, ConvertPacket_FailedFilter); 68 FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, ConvertPacket_FailedFilter);
70 FRIEND_TEST(BitstreamConverterTest, ConvertPacket_Success); 69 FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, ConvertPacket_Success);
71 FRIEND_TEST(BitstreamConverterTest, ConvertPacket_SuccessInPlace); 70 FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest,
71 ConvertPacket_SuccessInPlace);
72 72
73 std::string filter_name_; 73 std::string filter_name_;
74 AVBitStreamFilterContext* stream_filter_; 74 AVBitStreamFilterContext* stream_filter_;
75 AVCodecContext* stream_context_; 75 AVCodecContext* stream_context_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter); 77 DISALLOW_COPY_AND_ASSIGN(FFmpegBitstreamConverter);
78 }; 78 };
79 79
80 } // namespace media 80 } // namespace media
81 81
82 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_ 82 #endif // MEDIA_FILTERS_BITSTREAM_CONVERTER_H_
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_algorithm_ola.h ('k') | media/filters/ffmpeg_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698