[vlc-devel] [PATCH 1/1] mkv: uncompressed video support

Denis Charmet typx at dinauz.org
Tue Jun 28 14:25:06 CEST 2016


On 2016-06-26 13:45, Tim Allen wrote:
> ---
>  modules/demux/mkv/matroska_segment_parse.cpp | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/modules/demux/mkv/matroska_segment_parse.cpp
> b/modules/demux/mkv/matroska_segment_parse.cpp
> index 413bd16..6a2a7f1 100644
> --- a/modules/demux/mkv/matroska_segment_parse.cpp
> +++ b/modules/demux/mkv/matroska_segment_parse.cpp
> @@ -588,6 +588,19 @@ void matroska_segment_c::ParseTrackEntry(
> KaxTrackEntry *m )
>              vars.tk->f_fps = __MAX( static_cast<float>( vfps ), 1 );
>              debug( vars, "fps=%f", vars.tk->f_fps );
>          }
> +        E_CASE( KaxVideoColourSpace, colourspace )
> +        {
> +            if ( colourspace.ValidateSize() )
> +            {
> +                char clrspc[5];
> +
> +                vars.tk->fmt.i_codec = GetFOURCC( 
> colourspace.GetBuffer() );
> +
> +                vlc_fourcc_to_char( vars.tk->fmt.i_codec, clrspc );
> +                clrspc[4]  = '\0';
> +                debug( vars, "Colour Space=%s", clrspc );

<nitpick>
I would argue that you can just use something like:

                    uint8_t * clrspc = colourspace.GetBuffer();
                    vars.tk->fmt.i_codec = GetFOURCC( clrspc );
                    debug( vars, "Colour Space=%4.4s", clrspc);
</nitpick>

> +            }
> +        }
>          E_CASE( KaxTrackAudio, tka ) {
>              vars.tk->fmt.audio.i_channels = 1;
>              vars.tk->fmt.audio.i_rate = 8000;
> @@ -1372,6 +1385,9 @@ int32_t matroska_segment_c::TrackInit(
> mkv_track_t * p_tk )
>          S_CASE("V_MJPEG") {
>              vars.p_fmt->i_codec = VLC_CODEC_MJPG;
>          }
> +        S_CASE("V_UNCOMPRESSED") {
> +            msg_Dbg( vars.p_demuxer, "uncompressed format detected");
> +        }
>          S_CASE("A_MS/ACM") {
>              mkv_track_t * p_tk = vars.p_tk;
>              es_format_t * p_fmt = &vars.p_tk->fmt;

Regards,
-- 
Denis Charmet - TypX
Le mauvais esprit est un art de vivre


More information about the vlc-devel mailing list