コード例 #1
0
ファイル: p_mpeg1_2.cpp プロジェクト: Trottel/mkvtoolnix
mpeg1_2_video_packetizer_c::
mpeg1_2_video_packetizer_c(generic_reader_c *p_reader,
                           track_info_c &p_ti,
                           int version,
                           double fps,
                           int width,
                           int height,
                           int dwidth,
                           int dheight,
                           bool framed)
  : video_packetizer_c(p_reader, p_ti, "V_MPEG1", fps, width, height)
  , m_framed(framed)
  , m_aspect_ratio_extracted(true)
{

  set_codec_id((boost::format("V_MPEG%1%") % version).str());
  if (!display_dimensions_or_aspect_ratio_set()) {
    if ((0 < dwidth) && (0 < dheight))
      set_video_display_dimensions(dwidth, dheight, PARAMETER_SOURCE_BITSTREAM);
    else
      m_aspect_ratio_extracted = false;
  }

  m_timecode_factory_application_mode = TFA_SHORT_QUEUEING;

  // m_parser.SeparateSequenceHeaders();
}
コード例 #2
0
ファイル: p_mpeg1_2.cpp プロジェクト: basicmaster/mkvtoolnix
mpeg1_2_video_packetizer_c::
mpeg1_2_video_packetizer_c(generic_reader_c *p_reader,
                           track_info_c &p_ti,
                           int version,
                           double fps,
                           int width,
                           int height,
                           int dwidth,
                           int dheight,
                           bool framed)
  : generic_video_packetizer_c{p_reader, p_ti, "V_MPEG1", fps, width, height}
  , m_framed{framed}
  , m_aspect_ratio_extracted{true}
  , m_num_removed_stuffing_bytes{}
  , m_debug_stuffing_removal{"mpeg1_2|mpeg1_2_stuffing_removal"}
{

  set_codec_id((boost::format("V_MPEG%1%") % version).str());
  if (!display_dimensions_or_aspect_ratio_set()) {
    if ((0 < dwidth) && (0 < dheight))
      set_video_display_dimensions(dwidth, dheight, OPTION_SOURCE_BITSTREAM);
    else
      m_aspect_ratio_extracted = false;
  }

  m_timestamp_factory_application_mode = TFA_SHORT_QUEUEING;

  // m_parser.SeparateSequenceHeaders();
}
コード例 #3
0
mpeg4_p2_video_packetizer_c::
mpeg4_p2_video_packetizer_c(generic_reader_c *p_reader,
                            track_info_c &p_ti,
                            double fps,
                            int width,
                            int height,
                            bool input_is_native)
    : video_packetizer_c(p_reader, p_ti, MKV_V_MPEG4_ASP, fps, width, height)
    , m_timecodes_generated(0)
    , m_previous_timecode(0)
    , m_aspect_ratio_extracted(false)
    , m_input_is_native(input_is_native)
    , m_output_is_native(hack_engaged(ENGAGE_NATIVE_MPEG4) || input_is_native)
    , m_size_extracted(false)
{
    if (!m_output_is_native) {
        set_codec_id(MKV_V_MSCOMP);
        check_fourcc();

        m_timecode_factory_application_mode = TFA_SHORT_QUEUEING;

    } else {
        set_codec_id(MKV_V_MPEG4_ASP);
        if (!m_input_is_native)
            m_ti.m_private_data.reset();

        // If no external timecode file has been specified then mkvmerge
        // might have created a factory due to the --default-duration
        // command line argument. This factory must be disabled for this
        // packetizer because it takes care of handling the default
        // duration/FPS itself.
        if (m_ti.m_ext_timecodes.empty())
            m_timecode_factory.reset();

        if (m_default_duration_forced)
            m_fps = 1000000000.0 / m_htrack_default_duration;

        else if (0.0 != m_fps)
            m_htrack_default_duration = static_cast<int64_t>(1000000000ll / m_fps);

        m_timecode_factory_application_mode = TFA_FULL_QUEUEING;
    }
}