1 /*
2    mkvmerge -- utility for splicing together matroska files
3    from component media subtypes
4 
5    Distributed under the GPL v2
6    see the file COPYING for details
7    or visit https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
8 
9    class definition for the VPX output module
10 
11    Written by Moritz Bunkus <moritz@bunkus.org>.
12 */
13 
14 #pragma once
15 
16 #include "common/common_pch.h"
17 
18 #include "common/ivf.h"
19 #include "merge/generic_packetizer.h"
20 
21 class vpx_video_packetizer_c: public generic_packetizer_c {
22 protected:
23   int64_t m_previous_timestamp;
24   codec_c::type_e m_codec;
25   bool m_is_vp9{};
26 
27 public:
28   vpx_video_packetizer_c(generic_reader_c *p_reader, track_info_c &p_ti, codec_c::type_e p_codec);
29 
30   virtual void set_headers();
31 
get_format_name()32   virtual translatable_string_c get_format_name() const {
33     return YT("VP8/VP9");
34   }
35 
36   virtual connection_result_e can_connect_to(generic_packetizer_c *src, std::string &error_message);
37   virtual bool is_compatible_with(output_compatibility_e compatibility);
38 
39 protected:
40   virtual void process_impl(packet_cptr const &packet) override;
41   virtual void vp9_determine_codec_private(memory_c const &mem);
42 };
43