mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-13 05:31:44 +00:00
Use the VP8 packetizer for VP8 read from AVIs
This commit is contained in:
parent
d7391af290
commit
18e1816b78
@ -1,5 +1,8 @@
|
||||
2011-12-07 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: VP8 read from AVI could not be put into WebM
|
||||
compatible files.
|
||||
|
||||
* mkvmerge: bug fix: Fixed a rare audio type mis-detection of
|
||||
MP2/MP3 audio tracks in MPEG program streams causing mkvmerge to
|
||||
abort with an error message.
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "output/p_pcm.h"
|
||||
#include "output/p_video.h"
|
||||
#include "output/p_vorbis.h"
|
||||
#include "output/p_vp8.h"
|
||||
|
||||
#define GAB2_TAG FOURCC('G', 'A', 'B', '2')
|
||||
#define GAB2_ID_LANGUAGE 0x0000
|
||||
@ -257,6 +258,9 @@ avi_reader_c::create_video_packetizer() {
|
||||
else if (mpeg1_2::is_fourcc(get_uint32_le(codec)))
|
||||
create_mpeg1_2_packetizer();
|
||||
|
||||
else if (FOURCC('V', 'P', '8', '0') == get_uint32_be(codec))
|
||||
create_vp8_packetizer();
|
||||
|
||||
else
|
||||
create_standard_video_packetizer();
|
||||
}
|
||||
@ -346,6 +350,19 @@ avi_reader_c::create_mpeg4_p10_packetizer() {
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
avi_reader_c::create_vp8_packetizer() {
|
||||
m_ti.m_private_data = NULL;
|
||||
m_ti.m_private_size = 0;
|
||||
m_vptzr = add_packetizer(new vp8_video_packetizer_c(this, m_ti));
|
||||
|
||||
PTZR(m_vptzr)->set_track_default_duration(1000000000ll / m_fps);
|
||||
PTZR(m_vptzr)->set_video_pixel_width(AVI_video_width(m_avi));
|
||||
PTZR(m_vptzr)->set_video_pixel_height(AVI_video_height(m_avi));
|
||||
|
||||
show_packetizer_info(0, PTZR(m_vptzr));
|
||||
}
|
||||
|
||||
void
|
||||
avi_reader_c::create_standard_video_packetizer() {
|
||||
m_vptzr = add_packetizer(new video_packetizer_c(this, m_ti, NULL, m_fps, AVI_video_width(m_avi), AVI_video_height(m_avi)));
|
||||
@ -917,6 +934,9 @@ avi_reader_c::identify_video() {
|
||||
else if (mpeg1_2::is_fourcc(get_uint32_le(fourcc_str)))
|
||||
type = "MPEG-1/2";
|
||||
|
||||
else if (type == "VP80")
|
||||
type = "VP8";
|
||||
|
||||
id_result_track(0, ID_RESULT_TRACK_VIDEO, type, join(" ", extended_info));
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,7 @@ protected:
|
||||
virtual void create_mpeg1_2_packetizer();
|
||||
virtual void create_mpeg4_p2_packetizer();
|
||||
virtual void create_mpeg4_p10_packetizer();
|
||||
virtual void create_vp8_packetizer();
|
||||
virtual void create_video_packetizer();
|
||||
|
||||
void extended_identify_mpeg4_l2(std::vector<std::string> &extended_info);
|
||||
|
Loading…
Reference in New Issue
Block a user