예제 #1
0
        private static MediaCodecBufferFlags GetSyncsampleflags(MediaExtractorSampleFlags mxflag)
        {
            switch (mxflag)
            {
            case MediaExtractorSampleFlags.None:
                return(MediaCodecBufferFlags.None);

            case MediaExtractorSampleFlags.Encrypted:
                return(MediaCodecBufferFlags.None);

            case MediaExtractorSampleFlags.Sync:
                return(MediaCodecBufferFlags.SyncFrame);

            default:
                return(MediaCodecBufferFlags.None);
            }
        }
예제 #2
0
        private MediaCodecBufferFlags MFlags2MCodecBuff(MediaExtractorSampleFlags mfg)
        {
            switch (mfg)
            {
            case MediaExtractorSampleFlags.None:
                return(MediaCodecBufferFlags.None);

            case MediaExtractorSampleFlags.Encrypted:
                return(MediaCodecBufferFlags.KeyFrame);

            case MediaExtractorSampleFlags.Sync:
                return(MediaCodecBufferFlags.SyncFrame);

            default:
                throw new NotImplementedException("ConvertMediaExtractorSampleFlagsToMediaCodecBufferFlags");
            }
        }