Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a18bc8ed
Commit
a18bc8ed
authored
Jul 26, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AVI: cosmetics
parent
18834cd7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+9
-10
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+2
-3
modules/demux/avi/libavi.h
modules/demux/avi/libavi.h
+10
-9
No files found.
modules/demux/avi/avi.c
View file @
a18bc8ed
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001-2009 the VideoLAN team
* Copyright (C) 2001-2009 the VideoLAN team
* $Id$
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -50,7 +51,6 @@
...
@@ -50,7 +51,6 @@
*****************************************************************************/
*****************************************************************************/
#define INTERLEAVE_TEXT N_("Force interleaved method" )
#define INTERLEAVE_TEXT N_("Force interleaved method" )
#define INTERLEAVE_LONGTEXT N_( "Force interleaved method." )
#define INDEX_TEXT N_("Force index creation")
#define INDEX_TEXT N_("Force index creation")
#define INDEX_LONGTEXT N_( \
#define INDEX_LONGTEXT N_( \
...
@@ -75,7 +75,7 @@ vlc_module_begin ()
...
@@ -75,7 +75,7 @@ vlc_module_begin ()
set_subcategory
(
SUBCAT_INPUT_DEMUX
)
set_subcategory
(
SUBCAT_INPUT_DEMUX
)
add_bool
(
"avi-interleaved"
,
false
,
add_bool
(
"avi-interleaved"
,
false
,
INTERLEAVE_TEXT
,
INTERLEAVE_
LONG
TEXT
,
true
)
INTERLEAVE_TEXT
,
INTERLEAVE_TEXT
,
true
)
add_integer
(
"avi-index"
,
0
,
add_integer
(
"avi-index"
,
0
,
INDEX_TEXT
,
INDEX_LONGTEXT
,
false
)
INDEX_TEXT
,
INDEX_LONGTEXT
,
false
)
change_integer_list
(
pi_index
,
ppsz_indexes
)
change_integer_list
(
pi_index
,
ppsz_indexes
)
...
@@ -577,10 +577,10 @@ static int Open( vlc_object_t * p_this )
...
@@ -577,10 +577,10 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
p_palette
=
calloc
(
1
,
sizeof
(
video_palette_t
)
);
fmt
.
video
.
p_palette
=
calloc
(
1
,
sizeof
(
video_palette_t
)
);
fmt
.
video
.
p_palette
->
i_entries
=
__MIN
(
fmt
.
i_extra
/
4
,
256
);
fmt
.
video
.
p_palette
->
i_entries
=
__MIN
(
fmt
.
i_extra
/
4
,
256
);
for
(
int
i
=
0
;
i
<
fmt
.
video
.
p_palette
->
i_entries
;
i
++
)
for
(
int
k
=
0
;
k
<
fmt
.
video
.
p_palette
->
i_entries
;
k
++
)
{
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
for
(
int
j
=
0
;
j
<
4
;
j
++
)
fmt
.
video
.
p_palette
->
palette
[
i
][
j
]
=
p_pal
[
4
*
i
+
j
];
fmt
.
video
.
p_palette
->
palette
[
k
][
j
]
=
p_pal
[
4
*
k
+
j
];
}
}
}
}
}
}
...
@@ -775,10 +775,9 @@ error:
...
@@ -775,10 +775,9 @@ error:
static
void
Close
(
vlc_object_t
*
p_this
)
static
void
Close
(
vlc_object_t
*
p_this
)
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
unsigned
int
i
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
for
(
i
=
0
;
i
<
p_sys
->
i_track
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
p_sys
->
i_track
;
i
++
)
{
{
if
(
p_sys
->
track
[
i
]
)
if
(
p_sys
->
track
[
i
]
)
{
{
...
@@ -787,8 +786,10 @@ static void Close ( vlc_object_t * p_this )
...
@@ -787,8 +786,10 @@ static void Close ( vlc_object_t * p_this )
}
}
}
}
free
(
p_sys
->
track
);
free
(
p_sys
->
track
);
AVI_ChunkFreeRoot
(
p_demux
->
s
,
&
p_sys
->
ck_root
);
AVI_ChunkFreeRoot
(
p_demux
->
s
,
&
p_sys
->
ck_root
);
vlc_meta_Delete
(
p_sys
->
meta
);
vlc_meta_Delete
(
p_sys
->
meta
);
for
(
unsigned
i
=
0
;
i
<
p_sys
->
i_attachment
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
p_sys
->
i_attachment
;
i
++
)
vlc_input_attachment_Delete
(
p_sys
->
attachment
[
i
]);
vlc_input_attachment_Delete
(
p_sys
->
attachment
[
i
]);
free
(
p_sys
->
attachment
);
free
(
p_sys
->
attachment
);
...
@@ -1310,18 +1311,16 @@ static int Demux_UnSeekable( demux_t *p_demux )
...
@@ -1310,18 +1311,16 @@ static int Demux_UnSeekable( demux_t *p_demux )
*****************************************************************************/
*****************************************************************************/
static
int
Seek
(
demux_t
*
p_demux
,
mtime_t
i_date
,
int
i_percent
)
static
int
Seek
(
demux_t
*
p_demux
,
mtime_t
i_date
,
int
i_percent
)
{
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
msg_Dbg
(
p_demux
,
"seek requested: %"
PRId64
" seconds %d%%"
,
msg_Dbg
(
p_demux
,
"seek requested: %"
PRId64
" seconds %d%%"
,
i_date
/
1000000
,
i_percent
);
i_date
/
1000000
,
i_percent
);
if
(
p_sys
->
b_seekable
)
if
(
p_sys
->
b_seekable
)
{
{
unsigned
i_stream
;
if
(
!
p_sys
->
i_length
)
if
(
!
p_sys
->
i_length
)
{
{
avi_track_t
*
p_stream
=
NULL
;
avi_track_t
*
p_stream
=
NULL
;
unsigned
i_stream
;
int64_t
i_pos
;
int64_t
i_pos
;
/* use i_percent to create a true i_date */
/* use i_percent to create a true i_date */
...
@@ -1380,7 +1379,7 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
...
@@ -1380,7 +1379,7 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
}
}
/* */
/* */
for
(
i_stream
=
0
;
i_stream
<
p_sys
->
i_track
;
i_stream
++
)
for
(
unsigned
i_stream
=
0
;
i_stream
<
p_sys
->
i_track
;
i_stream
++
)
{
{
avi_track_t
*
p_stream
=
p_sys
->
track
[
i_stream
];
avi_track_t
*
p_stream
=
p_sys
->
track
[
i_stream
];
...
...
modules/demux/avi/libavi.c
View file @
a18bc8ed
...
@@ -26,13 +26,13 @@
...
@@ -26,13 +26,13 @@
#endif
#endif
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_demux.h>
#include <vlc_demux.h>
/* stream_*, *_ES */
#include <vlc_codecs.h>
/* VLC_BITMAPINFOHEADER */
#include <vlc_codecs.h>
/* VLC_BITMAPINFOHEADER */
#include "libavi.h"
#include "libavi.h"
#ifndef NDEBUG
#ifndef NDEBUG
#define AVI_DEBUG 1
#
define AVI_DEBUG 1
#endif
#endif
#define __EVEN( x ) (((x) + 1) & ~1)
#define __EVEN( x ) (((x) + 1) & ~1)
...
@@ -1045,4 +1045,3 @@ void *_AVI_ChunkFind( avi_chunk_t *p_chk,
...
@@ -1045,4 +1045,3 @@ void *_AVI_ChunkFind( avi_chunk_t *p_chk,
return
NULL
;
return
NULL
;
}
}
modules/demux/avi/libavi.h
View file @
a18bc8ed
...
@@ -38,10 +38,10 @@
...
@@ -38,10 +38,10 @@
/* the keyframe flag isn't a true flag */
/* the keyframe flag isn't a true flag */
/* but have to be verified */
/* but have to be verified */
#define AVI_CHUNK_COMMON
\
#define AVI_CHUNK_COMMON \
vlc_fourcc_t i_chunk_fourcc;
\
vlc_fourcc_t i_chunk_fourcc; \
uint64_t i_chunk_size;
\
uint64_t i_chunk_size; \
uint64_t i_chunk_pos;
\
uint64_t i_chunk_pos; \
union avi_chunk_u *p_next; \
union avi_chunk_u *p_next; \
union avi_chunk_u *p_father; \
union avi_chunk_u *p_father; \
union avi_chunk_u *p_first; \
union avi_chunk_u *p_first; \
...
@@ -57,6 +57,7 @@ typedef struct idx1_entry_s
...
@@ -57,6 +57,7 @@ typedef struct idx1_entry_s
uint32_t
i_length
;
uint32_t
i_length
;
}
idx1_entry_t
;
}
idx1_entry_t
;
typedef
struct
avi_chunk_common_s
typedef
struct
avi_chunk_common_s
{
{
AVI_CHUNK_COMMON
AVI_CHUNK_COMMON
...
@@ -247,15 +248,15 @@ typedef union avi_chunk_u
...
@@ -247,15 +248,15 @@ typedef union avi_chunk_u
* Stream(input) access functions
* Stream(input) access functions
****************************************************************************/
****************************************************************************/
int
AVI_ChunkRead
(
stream_t
*
,
int
AVI_ChunkRead
(
stream_t
*
,
avi_chunk_t
*
p_chk
,
avi_chunk_t
*
p_chk
,
avi_chunk_t
*
p_father
);
avi_chunk_t
*
p_father
);
void
AVI_ChunkFree
(
stream_t
*
,
avi_chunk_t
*
);
void
AVI_ChunkFree
(
stream_t
*
,
avi_chunk_t
*
);
int
_AVI_ChunkCount
(
avi_chunk_t
*
,
vlc_fourcc_t
);
int
_AVI_ChunkCount
(
avi_chunk_t
*
,
vlc_fourcc_t
);
void
*
_AVI_ChunkFind
(
avi_chunk_t
*
,
vlc_fourcc_t
,
int
);
void
*
_AVI_ChunkFind
(
avi_chunk_t
*
,
vlc_fourcc_t
,
int
);
int
AVI_ChunkReadRoot
(
stream_t
*
,
avi_chunk_t
*
p_root
);
int
AVI_ChunkReadRoot
(
stream_t
*
,
avi_chunk_t
*
p_root
);
void
AVI_ChunkFreeRoot
(
stream_t
*
,
avi_chunk_t
*
p_chk
);
void
AVI_ChunkFreeRoot
(
stream_t
*
,
avi_chunk_t
*
p_chk
);
#define AVI_ChunkCount( p_chk, i_fourcc ) \
#define AVI_ChunkCount( p_chk, i_fourcc ) \
_AVI_ChunkCount( AVI_CHUNK(p_chk), i_fourcc )
_AVI_ChunkCount( AVI_CHUNK(p_chk), i_fourcc )
...
@@ -349,9 +350,9 @@ void AVI_ChunkFreeRoot( stream_t *, avi_chunk_t *p_chk );
...
@@ -349,9 +350,9 @@ void AVI_ChunkFreeRoot( stream_t *, avi_chunk_t *p_chk );
#define AVITWOCC_tx VLC_TWOCC('t','x')
#define AVITWOCC_tx VLC_TWOCC('t','x')
#define AVITWOCC_sb VLC_TWOCC('s','b')
#define AVITWOCC_sb VLC_TWOCC('s','b')
/* *** codex stuff *** */
/* *** codex stuff *** */
/* DV */
/* DV */
#define FOURCC_dvsd VLC_FOURCC('d','v','s','d')
#define FOURCC_dvsd VLC_FOURCC('d','v','s','d')
#define FOURCC_dvhd VLC_FOURCC('d','v','h','d')
#define FOURCC_dvhd VLC_FOURCC('d','v','h','d')
#define FOURCC_dvsl VLC_FOURCC('d','v','s','l')
#define FOURCC_dvsl VLC_FOURCC('d','v','s','l')
...
...
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