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
cada6d07
Commit
cada6d07
authored
Oct 20, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: add wmv1/2 codec support.
parent
c72215f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
modules/codec/ffmpeg/ffmpeg.c
modules/codec/ffmpeg/ffmpeg.c
+7
-7
modules/codec/ffmpeg/ffmpeg.h
modules/codec/ffmpeg/ffmpeg.h
+14
-1
No files found.
modules/codec/ffmpeg/ffmpeg.c
View file @
cada6d07
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.
7 2002/10/14 21:59:44
fenrir Exp $
* $Id: ffmpeg.c,v 1.
8 2002/10/20 17:28:01
fenrir Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -288,7 +288,7 @@ static void __PES_NEXT( decoder_fifo_t *p_fifo )
...
@@ -288,7 +288,7 @@ static void __PES_NEXT( decoder_fifo_t *p_fifo )
vlc_mutex_unlock
(
&
p_fifo
->
data_lock
);
vlc_mutex_unlock
(
&
p_fifo
->
data_lock
);
}
}
static
inline
void
__GetFrame
(
videodec_thread_t
*
p_vdec
)
static
void
__GetFrame
(
videodec_thread_t
*
p_vdec
)
{
{
pes_packet_t
*
p_pes
;
pes_packet_t
*
p_pes
;
data_packet_t
*
p_data
;
data_packet_t
*
p_data
;
...
@@ -334,7 +334,7 @@ static inline void __GetFrame( videodec_thread_t *p_vdec )
...
@@ -334,7 +334,7 @@ static inline void __GetFrame( videodec_thread_t *p_vdec )
}
while
(
p_data
);
}
while
(
p_data
);
}
}
static
inline
void
__NextFrame
(
videodec_thread_t
*
p_vdec
)
static
void
__NextFrame
(
videodec_thread_t
*
p_vdec
)
{
{
__PES_NEXT
(
p_vdec
->
p_fifo
);
__PES_NEXT
(
p_vdec
->
p_fifo
);
}
}
...
@@ -666,13 +666,13 @@ static int InitThread( videodec_thread_t *p_vdec )
...
@@ -666,13 +666,13 @@ static int InitThread( videodec_thread_t *p_vdec )
}
}
/* ***** Fill p_context with init values ***** */
/* ***** Fill p_context with init values ***** */
#if LIBAVCODEC_BUILD >= 4624
//
#if LIBAVCODEC_BUILD >= 4624
p_vdec
->
p_context
=
avcodec_alloc_context
();
//
p_vdec->p_context = avcodec_alloc_context();
#else
//
#else
p_vdec
->
p_context
=
malloc
(
sizeof
(
AVCodecContext
)
);
p_vdec
->
p_context
=
malloc
(
sizeof
(
AVCodecContext
)
);
memset
(
p_vdec
->
p_context
,
0
,
sizeof
(
AVCodecContext
)
);
memset
(
p_vdec
->
p_context
,
0
,
sizeof
(
AVCodecContext
)
);
#endif
//#endif
p_vdec
->
p_context
->
width
=
p_vdec
->
format
.
i_width
;
p_vdec
->
p_context
->
width
=
p_vdec
->
format
.
i_width
;
p_vdec
->
p_context
->
height
=
p_vdec
->
format
.
i_height
;
p_vdec
->
p_context
->
height
=
p_vdec
->
format
.
i_height
;
...
...
modules/codec/ffmpeg/ffmpeg.h
View file @
cada6d07
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* ffmpeg_vdec.h: video decoder using ffmpeg library
* ffmpeg_vdec.h: video decoder using ffmpeg library
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: ffmpeg.h,v 1.
4 2002/10/14 21:59:44
fenrir Exp $
* $Id: ffmpeg.h,v 1.
5 2002/10/20 17:28:01
fenrir Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -144,6 +144,10 @@ typedef struct videodec_thread_s
...
@@ -144,6 +144,10 @@ typedef struct videodec_thread_s
/* Sorenson v1 */
/* Sorenson v1 */
#define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
#define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
/* wmv */
#define FOURCC_WMV1 VLC_FOURCC('W','M','V','1')
#define FOURCC_WMV2 VLC_FOURCC('W','M','V','2')
static
int
ffmpeg_GetFfmpegCodec
(
vlc_fourcc_t
i_fourcc
,
static
int
ffmpeg_GetFfmpegCodec
(
vlc_fourcc_t
i_fourcc
,
int
*
pi_ffmpeg_codec
,
int
*
pi_ffmpeg_codec
,
char
**
ppsz_name
)
char
**
ppsz_name
)
...
@@ -230,6 +234,15 @@ static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t i_fourcc,
...
@@ -230,6 +234,15 @@ static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t i_fourcc,
i_codec
=
CODEC_ID_H263I
;
i_codec
=
CODEC_ID_H263I
;
psz_name
=
"I263.I"
;
psz_name
=
"I263.I"
;
break
;
break
;
case
FOURCC_WMV1
:
i_codec
=
CODEC_ID_WMV1
;
psz_name
=
"Windows Media Video 1"
;
break
;
case
FOURCC_WMV2
:
i_codec
=
CODEC_ID_WMV2
;
psz_name
=
"Windows Media Video 2"
;
break
;
}
}
if
(
i_codec
)
if
(
i_codec
)
...
...
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