ffmpeg_bitstream_converter.h 846 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef MEDIA_FILTERS_FFMPEG_BITSTREAM_CONVERTER_H_
  5. #define MEDIA_FILTERS_FFMPEG_BITSTREAM_CONVERTER_H_
  6. #include "media/base/media_export.h"
  7. struct AVPacket;
  8. namespace media {
  9. // Interface for classes that allow reformating of FFmpeg bitstreams
  10. class MEDIA_EXPORT FFmpegBitstreamConverter {
  11. public:
  12. virtual ~FFmpegBitstreamConverter() {}
  13. // Reads the data in packet, and then overwrites this data with the
  14. // converted version of packet
  15. //
  16. // Returns false if conversion failed. In this case, |packet| should not be
  17. // changed.
  18. virtual bool ConvertPacket(AVPacket* packet) = 0;
  19. };
  20. } // namespace media
  21. #endif // MEDIA_FILTERS_FFMPEG_BITSTREAM_CONVERTER_H_