decoder
This commit is contained in:
		@ -22,6 +22,12 @@ class Demuxer:
 | 
			
		||||
        self.video_stream = self._find_stream(libav.AVMEDIA_TYPE_VIDEO)
 | 
			
		||||
        self.audio_stream = self._find_stream(libav.AVMEDIA_TYPE_AUDIO)
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def nb_streams(self):
 | 
			
		||||
        if not self._context:
 | 
			
		||||
            return 0
 | 
			
		||||
        return self._context.contents.nb_streams
 | 
			
		||||
 | 
			
		||||
    def _find_stream(self, type):
 | 
			
		||||
        index, codec_ref = libav.format_find_best_stream(self._context, type)
 | 
			
		||||
        if index < 0 or not codec_ref:
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user