Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
cdf8646f
Commit
cdf8646f
authored
Oct 27, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all : rewrite demux part (simpler and cleaner). Please, tell me if you see
some regression.
parent
4a0ddd5b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
612 additions
and
922 deletions
+612
-922
modules/demux/avi/Modules.am
modules/demux/avi/Modules.am
+0
-2
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+563
-887
modules/demux/avi/avi.h
modules/demux/avi/avi.h
+25
-29
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+24
-4
No files found.
modules/demux/avi/Modules.am
View file @
cdf8646f
SOURCES_avi = \
modules/demux/avi/avi.c \
modules/demux/avi/libioRIFF.c \
modules/demux/avi/libavi.c
noinst_HEADERS += \
modules/demux/avi/avi.h \
modules/demux/avi/libioRIFF.h \
modules/demux/avi/libavi.h
modules/demux/avi/avi.c
View file @
cdf8646f
This diff is collapsed.
Click to expand it.
modules/demux/avi/avi.h
View file @
cdf8646f
...
...
@@ -2,7 +2,7 @@
* avi.h : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.h,v 1.
4 2002/10/15 00:55:07
fenrir Exp $
* $Id: avi.h,v 1.
5 2002/10/27 15:37:16
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -20,7 +20,20 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MAX_PACKETS_IN_FIFO 2
typedef
struct
avi_packet_s
{
u32
i_fourcc
;
off_t
i_pos
;
u32
i_size
;
u32
i_type
;
// only for AVIFOURCC_LIST
u8
i_peek
[
8
];
//first 8 bytes
int
i_stream
;
int
i_cat
;
}
avi_packet_t
;
typedef
struct
AVIIndexEntry_s
{
...
...
@@ -29,22 +42,14 @@ typedef struct AVIIndexEntry_s
u32
i_pos
;
u32
i_length
;
u32
i_lengthtotal
;
}
AVIIndexEntry_t
;
typedef
struct
AVIESBuffer
_s
typedef
struct
avi_stream
_s
{
struct
AVIESBuffer_s
*
p_next
;
pes_packet_t
*
p_pes
;
int
i_posc
;
int
i_posb
;
}
AVIESBuffer_t
;
int
i_activated
;
typedef
struct
AVIStreamInfo_s
{
int
i_cat
;
/* AUDIO_ES, VIDEO_ES */
int
i_activated
;
vlc_fourcc_t
i_fourcc
;
vlc_fourcc_t
i_codec
;
...
...
@@ -52,8 +57,8 @@ typedef struct AVIStreamInfo_s
int
i_scale
;
int
i_samplesize
;
es_descriptor_t
*
p_es
;
int
b_selected
;
/* newly selected */
es_descriptor_t
*
p_es
;
AVIIndexEntry_t
*
p_index
;
int
i_idxnb
;
int
i_idxmax
;
...
...
@@ -61,32 +66,23 @@ typedef struct AVIStreamInfo_s
int
i_idxposc
;
/* numero of chunk */
int
i_idxposb
;
/* byte in the current chunk */
/* add some buffering */
AVIESBuffer_t
*
p_pes_first
;
AVIESBuffer_t
*
p_pes_last
;
int
i_pes_count
;
int
i_pes_totalsize
;
}
AVIStreamInfo_t
;
}
avi_stream_t
;
struct
demux_sys_t
{
mtime_t
i_time
;
mtime_t
i_length
;
mtime_t
i_pcr
;
int
i_rate
;
riffchunk_t
*
p_movi
;
int
b_seekable
;
avi_chunk_t
ck_root
;
/* Info extrated from avih */
off_t
i_movi_begin
;
off_t
i_movi_lastchunk_pos
;
/* XXX position of last valid chunk */
/* number of stream and informations*/
int
i_streams
;
AVIStreamInfo_t
**
pp_info
;
avi_stream_t
**
pp_info
;
/* current audio and video es */
AVIStreamInfo_t
*
p_info_video
;
AVIStreamInfo_t
*
p_info_audio
;
};
modules/demux/avi/libavi.c
View file @
cdf8646f
...
...
@@ -2,7 +2,7 @@
* libavi.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.
2 2002/10/26 19:14:45
fenrir Exp $
* $Id: libavi.c,v 1.
3 2002/10/27 15:37:16
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -109,14 +109,33 @@ int AVI_SeekAbsolute( input_thread_t *p_input,
}
else
{
int
i_peek
;
int
i_skip
=
i_pos
-
i_filepos
;
u8
*
p_peek
;
data_packet_t
*
p_data
;
int
i_skip
=
i_pos
-
i_filepos
;
msg_Warn
(
p_input
,
"will skip %d bytes, slow"
,
i_skip
);
if
(
i_skip
<
0
)
{
return
(
0
);
// failed
}
while
(
i_skip
>
0
)
{
int
i_read
;
i_read
=
input_SplitBuffer
(
p_input
,
&
p_data
,
__MIN
(
4096
,
i_skip
)
);
if
(
i_read
<
0
)
{
return
(
0
);
}
i_skip
-=
i_read
;
input_DeletePacket
(
p_input
->
p_method_data
,
p_data
);
if
(
i_read
==
0
&&
i_skip
>
0
)
{
return
(
0
);
}
}
#if 0
while( i_skip > 0 )
{
i_peek = input_Peek( p_input, &p_peek, i_skip+1 );
...
...
@@ -130,6 +149,7 @@ int AVI_SeekAbsolute( input_thread_t *p_input,
return( 0);
}
}
#endif
return
(
1
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment