annotate libmpdemux/demux_nsv.c @ 17892:2a37ab5a913e

1.226: Print the mute state on the OSD. 1.225: Fix up libaf unknown-format printing 1.224: last print on libaf to af_msg 1.223: [done by diego] 1.222: dwStart support for mencoder
author kraymer
date Sat, 18 Mar 2006 19:22:13 +0000
parents b849a99cdc3c
children fdb789f1a99a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
1
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
2 /*
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
3 * Nullsoft Streaming Video demuxer
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
4 * for MPlayer
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
5 * by Reza Jelveh <reza.jelveh@tuhh.de>
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
6 * seeking and PCM audio not yet supported
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
7 * PCM needs extra audio chunk "miniheader" parsing
12181
12ddc64011fe Add license, remove bogus comment as told by Reza Jelveh, the author.
diego
parents: 12179
diff changeset
8 * Based on A'rpis G2 work
12ddc64011fe Add license, remove bogus comment as told by Reza Jelveh, the author.
diego
parents: 12179
diff changeset
9 * Licence: GPL
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
10 */
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
11
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
12 #include <stdio.h>
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
13 #include <stdlib.h>
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
14 #include <unistd.h>
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
15
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
16 #include "config.h"
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
17 #include "mp_msg.h"
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
18 #include "help_mp.h"
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
19 #include "stream.h"
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
20 #include "demuxer.h"
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
21 #include "stheader.h"
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
22
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
23 typedef struct {
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
24 float v_pts;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
25 int video_pack_no;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
26 unsigned int a_format;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
27 unsigned int v_format;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
28 unsigned char fps;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
29 } nsv_priv_t;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
30
16318
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
31 #define HEADER_SEARCH_SIZE 65000
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
32
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
33
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
34 /**
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
35 * Seeking still to be implemented
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
36 */
17636
b849a99cdc3c Second-try commit of this patch.
corey
parents: 17569
diff changeset
37 static void demux_seek_nsv ( demuxer_t *demuxer, float rel_seek_secs, float audio_delay, int flags )
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
38 {
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
39 // seeking is not yet implemented
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
40 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
41
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
42
16175
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
43 static int demux_nsv_fill_buffer ( demuxer_t *demuxer, demux_stream_t *ds )
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
44 {
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
45 unsigned char hdr[17];
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
46 // for the extra data
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
47 unsigned char aux[6];
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
48 int i_aux = 0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
49 // videolen = audio chunk length, audiolen = video chunk length
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
50 int videolen,audiolen;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
51
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
52 sh_video_t *sh_video = demuxer->video->sh;
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
53 sh_audio_t *sh_audio = demuxer->audio->sh;
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
54
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
55 nsv_priv_t * priv = demuxer->priv;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
56
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
57 // if the audio/video chunk has no new header the first 2 bytes will be discarded 0xBEEF
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
58 // or rather 0xEF 0xBE
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
59 stream_read(demuxer->stream,hdr,7);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
60 if(stream_eof(demuxer->stream)) return 0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
61 // sometimes instead of 0xBEEF as described for the next audio/video chunk we get
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
62 // a whole new header
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
63
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
64 mp_dbg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: %08X %08X\n",hdr[0]<<8|hdr[1],stream_tell(demuxer->stream));
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
65 switch(hdr[0]<<8|hdr[1]) {
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
66 case 0x4E53:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
67 if(hdr[2]==0x56 && hdr[3]==0x73){
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
68 // NSVs
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
69 // get the header since there is no more metaheader after the first one
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
70 // there is no more need to skip that
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
71 stream_read(demuxer->stream,hdr+7,17-7);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
72 stream_read(demuxer->stream,hdr,7);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
73 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
74 break;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
75
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
76 case 0xEFBE:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
77 break;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
78
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
79 default:
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
80 mp_dbg(MSGT_DEMUX,MSGL_WARN,"demux_nsv: sync lost\n");
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
81 break;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
82 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
83
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
84 if (sh_video)
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
85 sh_video->pts = priv->v_pts =demuxer->video->pts= priv->video_pack_no *
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
86 (float)sh_video->frametime;
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
87 else
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
88 priv->v_pts = priv->video_pack_no;
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
89
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
90 demuxer->filepos=stream_tell(demuxer->stream);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
91
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
92
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
93 mp_dbg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: %08X: %02X %02X | %02X %02X %02X | %02X %02X \n",
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
94 (int)demuxer->filepos, hdr[0],hdr[1],hdr[2],hdr[3],hdr[4],hdr[5],hdr[6]);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
95
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
96 // read video:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
97 videolen=(hdr[2]>>4)|(hdr[3]<<4)|(hdr[4]<<0xC);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
98 //check if we got extra data like subtitles here
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
99 if( (hdr[2]&0x0f) != 0x0 ) {
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
100 stream_read( demuxer->stream, aux, 6);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
101
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
102 i_aux = aux[0]|aux[1]<<8;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
103 // We skip this extra data
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
104 stream_skip( demuxer->stream, i_aux );
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
105 i_aux+=6;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
106 videolen -= i_aux;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
107 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
108
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
109
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
110 // we need to return an empty packet when the
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
111 // video frame is empty otherwise the stream will fasten up
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
112 if(sh_video) {
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
113 if( (hdr[2]&0x0f) != 0x0 )
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
114 ds_read_packet(demuxer->video,demuxer->stream,videolen,priv->v_pts,demuxer->filepos-i_aux,0);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
115 else
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
116 ds_read_packet(demuxer->video,demuxer->stream,videolen,priv->v_pts,demuxer->filepos,0);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
117 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
118 else
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
119 stream_skip(demuxer->stream,videolen);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
120
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
121 // read audio:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
122 audiolen=(hdr[5])|(hdr[6]<<8);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
123 // we need to return an empty packet when the
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
124 // audio frame is empty otherwise the stream will fasten up
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
125 if(sh_audio) {
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
126 ds_read_packet(demuxer->audio,demuxer->stream,audiolen,priv->v_pts,demuxer->filepos+videolen,0);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
127 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
128 else
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
129 stream_skip(demuxer->stream,audiolen);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
130
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
131 ++priv->video_pack_no;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
132
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
133 return 1;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
134
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
135 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
136
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
137
16175
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
138 static demuxer_t* demux_open_nsv ( demuxer_t* demuxer )
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
139 {
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
140 // last 2 bytes 17 and 18 are unknown but right after that comes the length
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
141 unsigned char hdr[17];
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
142 int videolen,audiolen;
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
143 unsigned char buf[10];
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
144 sh_video_t *sh_video = NULL;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
145 sh_audio_t *sh_audio = NULL;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
146
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
147
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
148 nsv_priv_t * priv = malloc(sizeof(nsv_priv_t));
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
149 demuxer->priv=priv;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
150 priv->video_pack_no=0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
151
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
152 /* disable seeking yet to be fixed*/
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
153 demuxer->seekable = 0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
154
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
155 stream_read(demuxer->stream,hdr,4);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
156 if(stream_eof(demuxer->stream)) return 0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
157
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
158 if(hdr[0]==0x4E && hdr[1]==0x53 && hdr[2]==0x56){
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
159 // NSV header!
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
160 if(hdr[3]==0x73){
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
161 // NSVs
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
162 stream_read(demuxer->stream,hdr+4,17-4);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
163 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
164
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
165 if(hdr[3]==0x66){
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
166 // NSVf
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
167 int len=stream_read_dword_le(demuxer->stream);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
168 // TODO: parse out metadata!!!!
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
169 stream_skip(demuxer->stream,len-8);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
170
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
171 // NSVs
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
172 stream_read(demuxer->stream,hdr,17);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
173 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
174
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
175 // dummy debug message
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
176 mp_msg(MSGT_DEMUX,MSGL_V,"demux_nsv: Header: %.12s\n",hdr);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
177
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
178 // bytes 8-11 audio codec fourcc
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
179 // PCM fourcc needs extra parsing for every audio chunk, yet to implement
12896
e60cf1255df2 Fix -nosound and -novideo (bug #28)
rtognimp
parents: 12277
diff changeset
180 if((demuxer->audio->id != -2) && strncmp(hdr+8,"NONE", 4)){//&&strncmp(hdr+8,"VLB ", 4)){
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
181 sh_audio = new_sh_audio ( demuxer, 0 );
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
182 demuxer->audio->sh = sh_audio;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
183 sh_audio->format=mmioFOURCC(hdr[8],hdr[9],hdr[10],hdr[11]);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
184 sh_audio->ds = demuxer->audio;
12896
e60cf1255df2 Fix -nosound and -novideo (bug #28)
rtognimp
parents: 12277
diff changeset
185 priv->a_format=mmioFOURCC(hdr[8],hdr[9],hdr[10],hdr[11]);
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
186 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
187
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
188 // store hdr fps
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
189 priv->fps=hdr[16];
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
190
12896
e60cf1255df2 Fix -nosound and -novideo (bug #28)
rtognimp
parents: 12277
diff changeset
191 if ((demuxer->video->id != -2) && strncmp(hdr+4,"NONE", 4)) {
12198
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
192 /* Create a new video stream header */
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
193 sh_video = new_sh_video ( demuxer, 0 );
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
194
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
195 /* Make sure the demuxer knows about the new video stream header
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
196 * (even though new_sh_video() ought to take care of it)
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
197 */
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
198 demuxer->video->sh = sh_video;
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
199
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
200 /* Make sure that the video demuxer stream header knows about its
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
201 * parent video demuxer stream (this is getting wacky), or else
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
202 * video_read_properties() will choke
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
203 */
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
204 sh_video->ds = demuxer->video;
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
205
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
206 // bytes 4-7 video codec fourcc
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
207 priv->v_format = sh_video->format=mmioFOURCC(hdr[4],hdr[5],hdr[6],hdr[7]);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
208
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
209 // new video stream! parse header
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
210 sh_video->disp_w=hdr[12]|(hdr[13]<<8);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
211 sh_video->disp_h=hdr[14]|(hdr[15]<<8);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
212 sh_video->bih=(BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER));
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
213 sh_video->bih->biSize=sizeof(BITMAPINFOHEADER);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
214 sh_video->bih->biPlanes=1;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
215 sh_video->bih->biBitCount=24;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
216 sh_video->bih->biWidth=hdr[12]|(hdr[13]<<8);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
217 sh_video->bih->biHeight=hdr[14]|(hdr[15]<<8);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
218 memcpy(&sh_video->bih->biCompression,hdr+4,4);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
219 sh_video->bih->biSizeImage=sh_video->bih->biWidth*sh_video->bih->biHeight*3;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
220
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
221 // here we search for the correct keyframe
12275
3bd70d9bebb7 Fix VP62 keyframe search
rtognimp
parents: 12272
diff changeset
222 // vp6 keyframe is when the 2nd byte of the vp6 header is
3bd70d9bebb7 Fix VP62 keyframe search
rtognimp
parents: 12272
diff changeset
223 // 0x36 for VP61 and 0x46 for VP62
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
224 if((priv->v_format==mmioFOURCC('V','P','6','1')) ||
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
225 (priv->v_format==mmioFOURCC('V','P','6','2')) ||
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
226 (priv->v_format==mmioFOURCC('V','P','3','1'))) {
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
227 stream_read(demuxer->stream,buf,10);
12277
ad3a4af318f2 More keyframe search fix for VP6x
rtognimp
parents: 12275
diff changeset
228 if (((((priv->v_format>>16) & 0xff) == '6') && ((buf[8]&0x0e)!=0x06)) ||
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
229 ((((priv->v_format>>16) & 0xff) == '3') && (buf[8]!=0x00 || buf[9]!=0x08))) {
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
230 mp_msg(MSGT_DEMUX,MSGL_V,"demux_nsv: searching %.4s keyframe...\n", (char*)&priv->v_format);
12277
ad3a4af318f2 More keyframe search fix for VP6x
rtognimp
parents: 12275
diff changeset
231 while(((((priv->v_format>>16) & 0xff) == '6') && ((buf[8]&0x0e)!=0x06)) ||
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
232 ((((priv->v_format>>16) & 0xff) == '3') && (buf[8]!=0x00 || buf[9]!=0x08))){
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
233 mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: %.4s block skip.\n", (char*)&priv->v_format);
12179
aeb377ccb110 Fix vp61 keyframe search (do not skip blocks if 1st frame is keyframe)
rtognimp
parents: 12175
diff changeset
234 videolen=(buf[2]>>4)|(buf[3]<<4)|(buf[4]<<0xC);
aeb377ccb110 Fix vp61 keyframe search (do not skip blocks if 1st frame is keyframe)
rtognimp
parents: 12175
diff changeset
235 audiolen=(buf[5])|(buf[6]<<8);
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
236 stream_skip(demuxer->stream, videolen+audiolen-3);
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
237 stream_read(demuxer->stream,buf,10);
12277
ad3a4af318f2 More keyframe search fix for VP6x
rtognimp
parents: 12275
diff changeset
238 if(stream_eof(demuxer->stream)) return 0;
12179
aeb377ccb110 Fix vp61 keyframe search (do not skip blocks if 1st frame is keyframe)
rtognimp
parents: 12175
diff changeset
239 if(buf[0]==0x4E){
aeb377ccb110 Fix vp61 keyframe search (do not skip blocks if 1st frame is keyframe)
rtognimp
parents: 12175
diff changeset
240 mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: Got NSVs block.\n");
12272
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
241 stream_skip(demuxer->stream,7);
369073d0f143 Fix support for audio only streams
rtognimp
parents: 12198
diff changeset
242 stream_read(demuxer->stream,buf,10);
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
243 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
244 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
245 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
246
13299
6f8fe531dd73 avoid always skipping first junk with a "sync lost" message
reimar
parents: 12896
diff changeset
247 // data starts 10 bytes before current pos but later
6f8fe531dd73 avoid always skipping first junk with a "sync lost" message
reimar
parents: 12896
diff changeset
248 // we seek 17 backwards
6f8fe531dd73 avoid always skipping first junk with a "sync lost" message
reimar
parents: 12896
diff changeset
249 stream_skip(demuxer->stream,7);
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
250 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
251
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
252 switch(priv->fps){
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
253 case 0x80:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
254 sh_video->fps=30;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
255 break;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
256 case 0x81:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
257 sh_video->fps=(float)30000.0/1001.0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
258 break;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
259 case 0x82:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
260 sh_video->fps=25;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
261 break;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
262 case 0x83:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
263 sh_video->fps=(float)24000.0/1001.0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
264 break;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
265 case 0x85:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
266 sh_video->fps=(float)15000.0/1001.0;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
267 break;
15991
3042ee91c7dd support 10000/1001 framerate
reimar
parents: 13299
diff changeset
268 case 0x89:
3042ee91c7dd support 10000/1001 framerate
reimar
parents: 13299
diff changeset
269 sh_video->fps=(float)10000.0/1001.0;
3042ee91c7dd support 10000/1001 framerate
reimar
parents: 13299
diff changeset
270 break;
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
271 default:
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
272 sh_video->fps = (float)priv->fps;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
273 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
274 sh_video->frametime = (float)1.0 / (float)sh_video->fps;
12198
759b010d6c09 Do not crash on audio only streams
rtognimp
parents: 12181
diff changeset
275 }
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
276 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
277
13299
6f8fe531dd73 avoid always skipping first junk with a "sync lost" message
reimar
parents: 12896
diff changeset
278 // seek to start of NSV header
6f8fe531dd73 avoid always skipping first junk with a "sync lost" message
reimar
parents: 12896
diff changeset
279 stream_seek(demuxer->stream,stream_tell(demuxer->stream)-17);
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
280
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
281 return demuxer;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
282 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
283
16175
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
284 static int nsv_check_file ( demuxer_t* demuxer )
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
285 {
16318
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
286 unsigned char hdr;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
287 int i;
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
288
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
289 /* Store original position */
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
290 // off_t orig_pos = stream_tell(demuxer->stream);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
291
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
292 mp_msg ( MSGT_DEMUX, MSGL_V, "Checking for Nullsoft Streaming Video\n" );
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
293
16318
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
294 for (i = 0; i < HEADER_SEARCH_SIZE; i++) {
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
295 if (stream_read_char(demuxer->stream) != 'N')
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
296 continue;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
297 if(stream_eof(demuxer->stream))
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
298 return 0;
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
299
16318
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
300 if (stream_read_char(demuxer->stream) != 'S')
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
301 continue;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
302 if(stream_eof(demuxer->stream))
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
303 return 0;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
304 if (stream_read_char(demuxer->stream) != 'V')
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
305 continue;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
306 if(stream_eof(demuxer->stream))
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
307 return 0;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
308
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
309 hdr = stream_read_char(demuxer->stream);
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
310 if(stream_eof(demuxer->stream))
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
311 return 0;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
312 if((hdr == 'f') || (hdr == 's')) {
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
313 stream_seek(demuxer->stream,stream_tell(demuxer->stream)-4);
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
314 return DEMUXER_TYPE_NSV;
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
315 }
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
316 }
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
317
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
318 return 0;
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
319 }
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
320
16175
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
321 static void demux_close_nsv(demuxer_t* demuxer) {
12175
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
322 nsv_priv_t* priv = demuxer->priv;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
323
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
324 if(!priv)
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
325 return;
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
326 free(priv);
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
327
da8e39bfe121 nsv (Nullsoft streaming video) demuxer
rtognimp
parents:
diff changeset
328 }
16175
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
329
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
330
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
331 demuxer_desc_t demuxer_desc_nsv = {
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
332 "NullsoftVideo demuxer",
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
333 "nsv",
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
334 "Nullsoft Streaming Video",
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
335 "Reza Jelveh",
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
336 "nsv and nsa streaming files",
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
337 DEMUXER_TYPE_NSV,
16318
e27998eeb54a Fix nsv detection with new demuxer structure
rtognimp
parents: 16175
diff changeset
338 0, // safe but expensive autodetect
16175
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
339 nsv_check_file,
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
340 demux_nsv_fill_buffer,
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
341 demux_open_nsv,
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
342 demux_close_nsv,
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
343 demux_seek_nsv,
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
344 NULL
6b86089c2edd Demuxer modularization
rtognimp
parents: 15991
diff changeset
345 };