mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
Merge svn changes up to r27682
Addition of the "outdir" suboption to vo_png in svn was reverted before merging. Conflicts: command.c mplayer.c
This commit is contained in:
commit
ebb4abf208
@ -4480,10 +4480,10 @@ If <w> is specified lowres decoding will be used only if the width of the
|
||||
video is major than or equal to <w>.
|
||||
.RE
|
||||
.B o=<key>=<value>[,<key>=<value>[,...]]
|
||||
Pass AVOptions to libavcodec decoder
|
||||
Pass AVOptions to libavcodec decoder.
|
||||
Note, a patch to make the o= unneeded and pass all unknown options through
|
||||
the AVOption system is welcome.
|
||||
A full list of AVOptions can be found in FFmpeg manual.
|
||||
A full list of AVOptions can be found in the FFmpeg manual.
|
||||
Note that some options may conflict with MEncoder options.
|
||||
.sp 1
|
||||
.RS
|
||||
@ -7645,10 +7645,10 @@ Read the source for full details.
|
||||
.
|
||||
.TP
|
||||
.B o=<key>=<value>[,<key>=<value>[,...]]
|
||||
Pass AVOptions to libavcodec encoder
|
||||
Pass AVOptions to libavcodec encoder.
|
||||
Note, a patch to make the o= unneeded and pass all unknown options through
|
||||
the AVOption system is welcome.
|
||||
A full list of AVOptions can be found in FFmpeg manual.
|
||||
A full list of AVOptions can be found in the FFmpeg manual.
|
||||
Note that some AVOptions may conflict with MEncoder options.
|
||||
.sp 1
|
||||
.RS
|
||||
@ -10488,10 +10488,10 @@ Force a specific libavformat demuxer.
|
||||
.
|
||||
.TP
|
||||
.B o=<key>=<value>[,<key>=<value>[,...]]
|
||||
Pass AVOptions to libavformat demuxer
|
||||
Pass AVOptions to libavformat demuxer.
|
||||
Note, a patch to make the o= unneeded and pass all unknown options through
|
||||
the AVOption system is welcome.
|
||||
A full list of AVOptions can be found in FFmpeg manual.
|
||||
A full list of AVOptions can be found in the FFmpeg manual.
|
||||
Note that some options may conflict with MPlayer/MEncoder options.
|
||||
.sp 1
|
||||
.RS
|
||||
@ -10571,10 +10571,10 @@ Sometimes raising it is necessary in order to avoid "buffer underflows".
|
||||
.
|
||||
.TP
|
||||
.B o=<key>=<value>[,<key>=<value>[,...]]
|
||||
Pass AVOptions to libavformat muxer
|
||||
Pass AVOptions to libavformat muxer.
|
||||
Note, a patch to make the o= unneeded and pass all unknown options through
|
||||
the AVOption system is welcome.
|
||||
A full list of AVOptions can be found in FFmpeg manual.
|
||||
A full list of AVOptions can be found in the FFmpeg manual.
|
||||
Note that some options may conflict with MEncoder options.
|
||||
.sp 1
|
||||
.RS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" synced with r27466
|
||||
.\" synced with r27651
|
||||
.\" Encoding: iso-8859-1
|
||||
.\" MPlayer (C) 2000-2008 MPlayer Team
|
||||
.\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann
|
||||
@ -947,7 +947,7 @@ donc de votre responsablit
|
||||
le chemin de recherche $PATH, comme c'est le cas sous Windows).
|
||||
.sp 1
|
||||
Ceci peut être "détourné" pour désactiver un économiseur d'écran ne gérant par
|
||||
l'API de X prévu à cet effet.
|
||||
l'API de X prévu à cet effet (voir aussi \-stop\-xscreensaver).
|
||||
Si cela vous semble un peu trop compliqué, demandez à l'auteur du programme
|
||||
d'économiseur d'écran de gérer l'API de X dédiée.
|
||||
.sp 1
|
||||
@ -3396,6 +3396,8 @@ fbdev, x11 et TVout
|
||||
.B \-stop\-xscreensaver (X11 uniquement)
|
||||
Désactive xscreensaver (le reposeur d'écran) au lancement et le réactive
|
||||
à la sortie.
|
||||
Si votre reposeur d'écran ne supporte ni l'API XSS, ni XResetScreenSaver,
|
||||
alors veuillez utiliser \-heartbeat\-cmd à la place.
|
||||
.
|
||||
.TP
|
||||
.B "\-vm \ \ \ "
|
||||
@ -4722,8 +4724,24 @@ r
|
||||
Si <l> est défini, le décodage en résolution réduite sera effectué uniquement
|
||||
si la largeur de la vidéo est plus grande ou égale à <l>.
|
||||
.RE
|
||||
.IPs "o\ \ \ \ "
|
||||
FIXME: non documenté
|
||||
.B o=<clef>=<valeur>[,<clef>=<valeur>[,...]]
|
||||
Passe des AVOptions au décodeur libavcodec.
|
||||
Notez que la création d'une rustine pour que cette option ne soit pas
|
||||
nécessaire, mais qu'à la place, toutes les options inconnues soient passées
|
||||
au système AVOption est la bienvenue.
|
||||
Une liste complète des AVOptions est disponible dans la documentation de
|
||||
FFmpeg.
|
||||
De plus, notez que certaines options peuvent entrer en conflit avec les
|
||||
options de MEncoder.
|
||||
.sp 1
|
||||
.RS
|
||||
.I EXEMPLE\ :
|
||||
.RE
|
||||
.RSs
|
||||
.PD 0
|
||||
.IPs o=debug=pict
|
||||
.PD 1
|
||||
.RE
|
||||
.IPs "sb=<valeur> (MPEG-2 uniquement)"
|
||||
Saute <valeur> lignes de macro-blocs au bas de l'image.
|
||||
.IPs "st=<valeur> (MPEG-2 uniquement)"
|
||||
@ -8045,11 +8063,15 @@ Pour avoir tous les d
|
||||
.PD 1
|
||||
.
|
||||
.TP
|
||||
.B o=<key>=<value>[,<key>=<value>[,...]]
|
||||
Passe les à libavcodec les AVOptions.
|
||||
.B o=<clef>=<valeur>[,<clef>=<valeur>[,...]]
|
||||
Passe les AVOptions à l'encodeur libavcodec.
|
||||
Notez que la création d'une rustine pour que cette option ne soit pas
|
||||
nécessaire, mais qu'à la place, toutes les options inconnues soient passées
|
||||
au système AVOption est la bienvenue.
|
||||
Une liste complète des AVOptions est disponible dans la documentation de
|
||||
FFmpeg.
|
||||
De plus, notez que certaines options peuvent entrer en conflit avec les
|
||||
options de MEncoder.
|
||||
.sp 1
|
||||
.RS
|
||||
.I EXEMPLE\ :
|
||||
@ -9559,10 +9581,6 @@ FIXME: Document this.
|
||||
.B skip_threshold=<0\-1000000>
|
||||
FIXME: Document this.
|
||||
.
|
||||
.TP
|
||||
.B "o\ \ \ \ \ \ "
|
||||
FIXME: non documenté
|
||||
.
|
||||
.
|
||||
.SS nuv (\-nuvopts)
|
||||
.
|
||||
@ -11066,8 +11084,24 @@ Dur
|
||||
Force l'utilisation d'un dé-multiplexeur libavformat spécifique.
|
||||
.
|
||||
.TP
|
||||
.B "o\ \ \ \ \ \ "
|
||||
FIXME: non documenté
|
||||
.B o=<clef>=<valeur>[,<clef>=<valeur>[,...]]
|
||||
Passe les AVOptions au démultiplexeur libavformat.
|
||||
Notez que la création d'une rustine pour que cette option ne soit pas
|
||||
nécessaire, mais qu'à la place, toutes les options inconnues soient passées
|
||||
au système AVOption est la bienvenue.
|
||||
Une liste complète des AVOptions est disponible dans la documentation de
|
||||
FFmpeg.
|
||||
De plus, notez que certaines options peuvent entrer en conflit avec les
|
||||
options de MPlayer/MEncoder.
|
||||
.sp 1
|
||||
.RS
|
||||
.I EXEMPLE\ :
|
||||
.RE
|
||||
.RSs
|
||||
.PD 0
|
||||
.IPs o=ignidx
|
||||
.PD 1
|
||||
.RE
|
||||
.
|
||||
.TP
|
||||
.B probesize=<valeur>
|
||||
@ -11117,6 +11151,8 @@ format MPEG-4 avec les drapeaux suppl
|
||||
(firmware) des iPods d'Apple
|
||||
.IPs "dv\ \ \ "
|
||||
Sony Digital Video container
|
||||
.IPs "matroska\ \ \ "
|
||||
Matroska
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
@ -11128,8 +11164,24 @@ Il arrive qu'il faille augmenter ce param
|
||||
de tampons "buffer underflows".
|
||||
.
|
||||
.TP
|
||||
.B "o\ \ \ \ \ \ "
|
||||
FIXME: non documenté
|
||||
.B o=<clef>=<valeur>[,<clef>=<valeur>[,...]]
|
||||
Passe les AVOptions au multiplexeur libavformat.
|
||||
Notez que la création d'une rustine pour que cette option ne soit pas
|
||||
nécessaire, mais qu'à la place, toutes les options inconnues soient passées
|
||||
au système AVOption est la bienvenue.
|
||||
Une liste complète des AVOptions est disponible dans la documentation de
|
||||
FFmpeg.
|
||||
De plus, notez que certaines options peuvent entrer en conflit avec les
|
||||
options de MEncoder.
|
||||
.sp 1
|
||||
.RS
|
||||
.I EXEMPLE\ :
|
||||
.RE
|
||||
.RSs
|
||||
.PD 0
|
||||
.IPs o=packetsize=100
|
||||
.PD 1
|
||||
.RE
|
||||
.
|
||||
.TP
|
||||
.B packetsize=<taille>
|
||||
|
@ -26,6 +26,10 @@ after processing the command. "pausing_keep " tells MPlayer to do so only if
|
||||
it was already in paused mode. "pausing_toggle " tells MPlayer to do so
|
||||
only if it was not already in paused mode. Please note that "as soon as
|
||||
possible" can be before the command is fully executed.
|
||||
As a temporary hack, there is also the _experimental_ "pausing_keep_force "
|
||||
prefix, with which MPlayer will not exit the pause loop at all.
|
||||
Like this you can avoid the "frame stepping" effect of "pausing_keep "
|
||||
but most commands will either not work at all or behave in unexpected ways.
|
||||
|
||||
|
||||
Available commands ('mplayer -input cmdlist' will print a list):
|
||||
@ -466,6 +470,7 @@ name type min max get set step comment
|
||||
osdlevel int 0 3 X X X as -osdlevel
|
||||
speed float 0.01 100 X X X as -speed
|
||||
loop int -1 X X X as -loop
|
||||
pause flag 0 1 X 1 if paused, use with pausing_keep_force
|
||||
filename string X file playing wo path
|
||||
path string X file playing
|
||||
demuxer string X demuxer used
|
||||
@ -474,6 +479,7 @@ stream_start pos 0 X start pos in stream
|
||||
stream_end pos 0 X end pos in stream
|
||||
stream_length pos 0 X (end - start)
|
||||
chapter int 0 X X X select chapter
|
||||
chapters int X number of chapters
|
||||
angle int 0 X X X select angle
|
||||
length time X length of file in seconds
|
||||
percent_pos int 0 100 X X X position in percent
|
||||
|
@ -177,11 +177,9 @@ See the <link linkend="subosd">Subtitles and OSD</link> section for details.
|
||||
<title>What about the GUI?</title>
|
||||
|
||||
<para>
|
||||
The GUI needs GTK 1.2.x or GTK 2.0 (it isn't fully GTK, but the panels are).
|
||||
The skins are stored in PNG format, so GTK,
|
||||
<systemitem class="library">libpng</systemitem> (and their devel stuff, usually
|
||||
called <systemitem class="library">gtk-dev</systemitem>
|
||||
and <systemitem class="library">libpng-dev</systemitem>) has to be installed.
|
||||
The GUI needs GTK 1.2.x or GTK 2.0 (it isn't fully GTK, but the panels are),
|
||||
so <systemitem class="library">GTK</systemitem> (and the devel stuff, usually
|
||||
called <systemitem class="library">gtk-dev</systemitem>) has to be installed.
|
||||
You can build it by specifying <option>--enable-gui</option> during
|
||||
<filename>./configure</filename>. Then, to turn on GUI mode, you have to
|
||||
execute the <command>gmplayer</command> binary.
|
||||
@ -189,16 +187,16 @@ execute the <command>gmplayer</command> binary.
|
||||
|
||||
<para>
|
||||
As <application>MPlayer</application> doesn't have a skin included, you
|
||||
have to download them if you want to use the GUI. See the <ulink
|
||||
have to download one if you want to use the GUI. See the <ulink
|
||||
url="http://www.mplayerhq.hu/dload.html">download page</ulink>.
|
||||
They should be extracted to the usual system-wide directory (<filename
|
||||
It should be extracted to the usual system-wide directory (<filename
|
||||
class="directory">$PREFIX/share/mplayer/skins</filename>), or to <filename
|
||||
class="directory">$HOME/.mplayer/skins</filename>.
|
||||
<application>MPlayer</application> by default looks in these directories
|
||||
for a directory named <filename class="directory">default</filename>, but
|
||||
you can use the <option>-skin <replaceable>newskin</replaceable></option>
|
||||
option, or the <literal>skin=newskin</literal> config file directive to use
|
||||
the skin in <filename class="directory">*/skins/newskin</filename>
|
||||
the skin in the <filename class="directory">*/skins/newskin</filename>
|
||||
directory.
|
||||
</para>
|
||||
</sect1>
|
||||
|
3
Makefile
3
Makefile
@ -357,8 +357,7 @@ SRCS_COMMON-$(LIBMPEG2) += libmpcodecs/vd_libmpeg2.c \
|
||||
SRCS_COMMON-$(LIBMPEG2)-$(ARCH_ALPHA) += libmpeg2/idct_alpha.c \
|
||||
libmpeg2/motion_comp_alpha.c
|
||||
SRCS_COMMON-$(LIBMPEG2)-$(ARCH_ARMV4L) += libmpeg2/motion_comp_arm.c \
|
||||
libmpeg2/motion_comp_arm_s.S \
|
||||
libmpeg2/motion_comp_iwmmxt.c
|
||||
libmpeg2/motion_comp_arm_s.S
|
||||
SRCS_COMMON-$(LIBMPEG2)-$(HAVE_ALTIVEC) += libmpeg2/idct_altivec.c \
|
||||
libmpeg2/motion_comp_altivec.c
|
||||
SRCS_COMMON-$(LIBMPEG2)-$(HAVE_MMX) += libmpeg2/idct_mmx.c \
|
||||
|
326
TOOLS/asfinfo.c
326
TOOLS/asfinfo.c
@ -6,46 +6,46 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct __attribute__((packed))
|
||||
typedef struct __attribute__((packed))
|
||||
{
|
||||
long biSize; // sizeof(BITMAPINFOHEADER)
|
||||
long biWidth;
|
||||
long biHeight;
|
||||
short biPlanes; // unused
|
||||
short biBitCount;
|
||||
long biCompression; // fourcc of image
|
||||
long biSizeImage; // size of image. For uncompressed images
|
||||
// ( biCompression 0 or 3 ) can be zero.
|
||||
long biSize; // sizeof(BITMAPINFOHEADER)
|
||||
long biWidth;
|
||||
long biHeight;
|
||||
short biPlanes; // unused
|
||||
short biBitCount;
|
||||
long biCompression; // fourcc of image
|
||||
long biSizeImage; // size of image. For uncompressed images
|
||||
// ( biCompression 0 or 3 ) can be zero.
|
||||
|
||||
|
||||
long biXPelsPerMeter; // unused
|
||||
long biYPelsPerMeter; // unused
|
||||
long biClrUsed; // valid only for palettized images.
|
||||
// Number of colors in palette.
|
||||
long biClrImportant;
|
||||
long biXPelsPerMeter; // unused
|
||||
long biYPelsPerMeter; // unused
|
||||
long biClrUsed; // valid only for palettized images.
|
||||
// Number of colors in palette.
|
||||
long biClrImportant;
|
||||
} BITMAPINFOHEADER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short wFormatTag; // value that identifies compression format
|
||||
short nChannels;
|
||||
long nSamplesPerSec;
|
||||
long nAvgBytesPerSec;
|
||||
short nBlockAlign; // size of a data sample
|
||||
short wBitsPerSample;
|
||||
short cbSize; // size of format-specific data
|
||||
short wFormatTag; // value that identifies compression format
|
||||
short nChannels;
|
||||
long nSamplesPerSec;
|
||||
long nAvgBytesPerSec;
|
||||
short nBlockAlign; // size of a data sample
|
||||
short wBitsPerSample;
|
||||
short cbSize; // size of format-specific data
|
||||
} WAVEFORMATEX;
|
||||
|
||||
typedef struct __attribute__((packed)) {
|
||||
unsigned char guid[16];
|
||||
unsigned char guid[16];
|
||||
unsigned long long size;
|
||||
} ASF_obj_header_t;
|
||||
|
||||
typedef struct __attribute__((packed)) {
|
||||
ASF_obj_header_t objh;
|
||||
unsigned int cno; // number of subchunks
|
||||
unsigned char v1; // unknown (0x01)
|
||||
unsigned char v2; // unknown (0x02)
|
||||
unsigned int cno; // number of subchunks
|
||||
unsigned char v1; // unknown (0x01)
|
||||
unsigned char v2; // unknown (0x02)
|
||||
} ASF_header_t;
|
||||
|
||||
typedef struct __attribute__((packed)) {
|
||||
@ -106,150 +106,168 @@ static char* chunk_type(unsigned char* guid){
|
||||
}
|
||||
|
||||
static void print_wave_header(WAVEFORMATEX *h){
|
||||
|
||||
printf("======= WAVE Format =======\n");
|
||||
|
||||
printf("Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag);
|
||||
printf("Channels: %d\n",h->nChannels);
|
||||
printf("Samplerate: %ld\n",h->nSamplesPerSec);
|
||||
printf("avg byte/sec: %ld\n",h->nAvgBytesPerSec);
|
||||
printf("Block align: %d\n",h->nBlockAlign);
|
||||
printf("bits/sample: %d\n",h->wBitsPerSample);
|
||||
printf("cbSize: %d\n",h->cbSize);
|
||||
|
||||
|
||||
printf("Format Tag: %d (0x%X)\n", h->wFormatTag, h->wFormatTag);
|
||||
printf("Channels: %d\n", h->nChannels);
|
||||
printf("Samplerate: %ld\n", h->nSamplesPerSec);
|
||||
printf("avg byte/sec: %ld\n", h->nAvgBytesPerSec);
|
||||
printf("Block align: %d\n", h->nBlockAlign);
|
||||
printf("bits/sample: %d\n", h->wBitsPerSample);
|
||||
printf("cbSize: %d\n", h->cbSize);
|
||||
|
||||
switch(h->wFormatTag){
|
||||
case 0x01: printf("Audio in PCM format\n");break;
|
||||
case 0x50: printf("Audio in MPEG Layer 1/2 format\n");break;
|
||||
case 0x55: printf("Audio in MPEG Layer-3 format\n");break; // ACM
|
||||
case 0x02: printf("Audio in MS ADPCM format\n");break; // ACM
|
||||
case 0x11: printf("Audio in IMA ADPCM format\n");break; // ACM
|
||||
case 0x31:
|
||||
case 0x32: printf("Audio in MS GSM 6.10 format\n");break; // ACM
|
||||
case 0x160:
|
||||
case 0x161: printf("Audio in DivX WMA format\n");break; // ACM
|
||||
default: printf("Audio in UNKNOWN (id=0x%X) format\n",h->wFormatTag);
|
||||
case 0x01: printf("Audio in PCM format\n"); break;
|
||||
case 0x50: printf("Audio in MPEG Layer 1/2 format\n"); break;
|
||||
case 0x55: printf("Audio in MPEG Layer-3 format\n"); break; // ACM
|
||||
case 0x02: printf("Audio in MS ADPCM format\n"); break; // ACM
|
||||
case 0x11: printf("Audio in IMA ADPCM format\n"); break; // ACM
|
||||
case 0x31:
|
||||
case 0x32: printf("Audio in MS GSM 6.10 format\n"); break; // ACM
|
||||
case 0x160:
|
||||
case 0x161: printf("Audio in DivX WMA format\n"); break; // ACM
|
||||
default: printf("Audio in UNKNOWN (id=0x%X) format\n", h->wFormatTag);
|
||||
}
|
||||
|
||||
printf("===========================\n");
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void print_video_header(BITMAPINFOHEADER *h){
|
||||
printf("======= VIDEO Format ======\n");
|
||||
printf(" biSize %ld\n", h->biSize);
|
||||
printf(" biWidth %ld\n", h->biWidth);
|
||||
printf(" biHeight %ld\n", h->biHeight);
|
||||
printf(" biPlanes %d\n", h->biPlanes);
|
||||
printf(" biBitCount %d\n", h->biBitCount);
|
||||
printf(" biCompression %ld='%.4s'\n", h->biCompression, &h->biCompression);
|
||||
printf(" biSizeImage %ld\n", h->biSizeImage);
|
||||
printf(" biSize %ld\n", h->biSize);
|
||||
printf(" biWidth %ld\n", h->biWidth);
|
||||
printf(" biHeight %ld\n", h->biHeight);
|
||||
printf(" biPlanes %d\n", h->biPlanes);
|
||||
printf(" biBitCount %d\n", h->biBitCount);
|
||||
printf(" biCompression %ld='%.4s'\n", h->biCompression, &h->biCompression);
|
||||
printf(" biSizeImage %ld\n", h->biSizeImage);
|
||||
printf("===========================\n");
|
||||
}
|
||||
|
||||
FILE* streams[128];
|
||||
|
||||
int main(int argc,char* argv[]){
|
||||
FILE *f=fopen(argc>1?argv[1]:"Alice Deejay - Back In My Life.asf","rb");
|
||||
|
||||
if(!f){ printf("file not found\n");exit(1);}
|
||||
|
||||
//printf("sizeof=%d\n",sizeof(objh));
|
||||
//printf("sizeof=%d\n",sizeof(asfh));
|
||||
|
||||
fread(&asfh,sizeof(asfh),1,f); // header obj
|
||||
//for(i=0;i<16;i++) printf("%02X ",asfh.objh.guid[i]);
|
||||
printf("[%s] %d (subchunks: %d)\n",chunk_type(asfh.objh.guid),(int) asfh.objh.size,asfh.cno);
|
||||
|
||||
while(fread(&objh,sizeof(objh),1,f)>0){
|
||||
int pos=ftell(f);
|
||||
// for(i=0;i<16;i++) printf("%02X ",objh.guid[i]);
|
||||
printf("0x%08X [%s] %d\n",pos-sizeof(objh), chunk_type(objh.guid),(int) objh.size);
|
||||
switch(*((unsigned int*)&objh.guid)){
|
||||
case 0xB7DC0791: // guid_stream_header
|
||||
fread(&streamh,sizeof(streamh),1,f);
|
||||
printf("stream type: %s\n",chunk_type(streamh.type));
|
||||
printf("stream concealment: %s\n",chunk_type(streamh.concealment));
|
||||
printf("type: %d bytes, stream: %d bytes ID: %d\n",(int)streamh.type_size,(int)streamh.stream_size,(int)streamh.stream_no);
|
||||
printf("FILEPOS=0x%lX\n",ftell(f));
|
||||
// type-specific data:
|
||||
fread(buffer,streamh.type_size,1,f);
|
||||
switch(*((unsigned int*)&streamh.type)){
|
||||
case 0xF8699E40: // guid_audio_stream
|
||||
print_wave_header((WAVEFORMATEX*)buffer);
|
||||
break;
|
||||
case 0xBC19EFC0: // guid_video_stream
|
||||
print_video_header((BITMAPINFOHEADER*)&buffer[4+4+1+2]);
|
||||
break;
|
||||
}
|
||||
// stream-specific data:
|
||||
fread(buffer,streamh.stream_size,1,f);
|
||||
break;
|
||||
// case 0xD6E229D1: return "guid_header_2_0";
|
||||
case 0x8CABDCA1: // guid_file_header
|
||||
fread(&fileh,sizeof(fileh),1,f);
|
||||
printf("packets: %d flags: %d pack_size: %d frame_size: %d\n",(int)fileh.packets,(int)fileh.flags,(int)fileh.packetsize,(int)fileh.frame_size);
|
||||
break;
|
||||
case 0x75b22636: // guid_data_chunk
|
||||
{ int endp=pos+objh.size-sizeof(objh);
|
||||
unsigned char* packet=malloc((int)fileh.packetsize);
|
||||
int fpos;
|
||||
fseek(f,26,SEEK_CUR);
|
||||
while((fpos=ftell(f))<endp){
|
||||
fread(packet,(int)fileh.packetsize,1,f);
|
||||
if(packet[0]==0x82){
|
||||
unsigned char flags=packet[3];
|
||||
unsigned char* p=&packet[5];
|
||||
unsigned long time;
|
||||
unsigned short duration;
|
||||
int segs=1;
|
||||
int seg;
|
||||
int padding=0;
|
||||
if(flags&8){
|
||||
padding=p[0];++p;
|
||||
} else
|
||||
if(flags&16){
|
||||
padding=p[0]|(p[1]<<8);p+=2;
|
||||
}
|
||||
time=*((unsigned long*)p);p+=4;
|
||||
duration=*((unsigned short*)p);p+=2;
|
||||
if(flags&1){
|
||||
segs=p[0]-0x80;++p;
|
||||
}
|
||||
printf("%08X: flag=%02X segs=%d pad=%d time=%ld dur=%d\n",
|
||||
fpos,flags,segs,padding,time,duration);
|
||||
for(seg=0;seg<segs;seg++){
|
||||
ASF_segmhdr_t* sh=(ASF_segmhdr_t*)p;
|
||||
int len=0;
|
||||
p+=sizeof(ASF_segmhdr_t);
|
||||
if(sh->flag&8) p+=8;// else
|
||||
if(sh->flag&1) ++p;
|
||||
if(flags&1){
|
||||
len=*((unsigned short*)p);p+=2;
|
||||
}
|
||||
printf(" seg #%d: streamno=%d seq=%d flag=%02X len=%d\n",seg,sh->streamno&0x7F,sh->seq,sh->flag,len);
|
||||
#ifdef SAVE_STREAMS
|
||||
if(!streams[sh->streamno&0x7F]){
|
||||
char name[256];
|
||||
snprintf(name,256,"stream%02X.dat",sh->streamno&0x7F);
|
||||
streams[sh->streamno&0x7F]=fopen(name,"wb");
|
||||
}
|
||||
fwrite(p,len,1,streams[sh->streamno&0x7F]);
|
||||
#endif
|
||||
p+=len;
|
||||
}
|
||||
} else
|
||||
printf("%08X: UNKNOWN %02X %02X %02X %02X %02X...\n",fpos,packet[0],packet[1],packet[2],packet[3],packet[4]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// case 0x33000890: return "guid_index_chunk";
|
||||
int main(int argc, char* argv[]){
|
||||
FILE *f = fopen(argc > 1 ? argv[1] : "Alice Deejay - Back In My Life.asf", "rb");
|
||||
|
||||
if(!f){
|
||||
printf("file not found\n");
|
||||
exit(1);
|
||||
}
|
||||
fseek(f,pos+objh.size-sizeof(objh),SEEK_SET);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
//printf("sizeof=%d\n", sizeof(objh));
|
||||
//printf("sizeof=%d\n", sizeof(asfh));
|
||||
|
||||
fread(&asfh, sizeof(asfh), 1, f); // header obj
|
||||
//for(i = 0; i < 16; i++)
|
||||
// printf("%02X ", asfh.objh.guid[i]);
|
||||
printf("[%s] %d (subchunks: %d)\n", chunk_type(asfh.objh.guid),
|
||||
(int) asfh.objh.size, asfh.cno);
|
||||
|
||||
while(fread(&objh, sizeof(objh), 1, f) > 0){
|
||||
int pos = ftell(f);
|
||||
//for(i = 0; i < 16; i++)
|
||||
// printf("%02X ", objh.guid[i]);
|
||||
printf("0x%08X [%s] %d\n", pos-sizeof(objh), chunk_type(objh.guid),
|
||||
(int) objh.size);
|
||||
switch(*((unsigned int*)&objh.guid)){
|
||||
case 0xB7DC0791: // guid_stream_header
|
||||
fread(&streamh, sizeof(streamh), 1, f);
|
||||
printf("stream type: %s\n", chunk_type(streamh.type));
|
||||
printf("stream concealment: %s\n", chunk_type(streamh.concealment));
|
||||
printf("type: %d bytes, stream: %d bytes ID: %d\n",
|
||||
(int)streamh.type_size, (int)streamh.stream_size,
|
||||
(int)streamh.stream_no);
|
||||
printf("FILEPOS=0x%lX\n", ftell(f));
|
||||
// type-specific data:
|
||||
fread(buffer,streamh.type_size,1,f);
|
||||
switch(*((unsigned int*)&streamh.type)){
|
||||
case 0xF8699E40: // guid_audio_stream
|
||||
print_wave_header((WAVEFORMATEX*)buffer);
|
||||
break;
|
||||
case 0xBC19EFC0: // guid_video_stream
|
||||
print_video_header((BITMAPINFOHEADER*)&buffer[4 + 4 + 1 + 2]);
|
||||
break;
|
||||
}
|
||||
// stream-specific data:
|
||||
fread(buffer, streamh.stream_size, 1, f);
|
||||
break;
|
||||
//case 0xD6E229D1:
|
||||
// return "guid_header_2_0";
|
||||
case 0x8CABDCA1: // guid_file_header
|
||||
fread(&fileh, sizeof(fileh), 1, f);
|
||||
printf("packets: %d flags: %d pack_size: %d frame_size: %d\n",
|
||||
(int)fileh.packets, (int)fileh.flags, (int)fileh.packetsize,
|
||||
(int)fileh.frame_size);
|
||||
break;
|
||||
case 0x75b22636: // guid_data_chunk
|
||||
{ int endp = pos + objh.size - sizeof(objh);
|
||||
unsigned char* packet = malloc((int)fileh.packetsize);
|
||||
int fpos;
|
||||
fseek(f, 26, SEEK_CUR);
|
||||
while((fpos = ftell(f)) < endp){
|
||||
fread(packet, (int)fileh.packetsize, 1, f);
|
||||
if(packet[0] == 0x82){
|
||||
unsigned char flags = packet[3];
|
||||
unsigned char* p = &packet[5];
|
||||
unsigned long time;
|
||||
unsigned short duration;
|
||||
int segs = 1;
|
||||
int seg;
|
||||
int padding=0;
|
||||
if(flags & 8){
|
||||
padding = p[0];
|
||||
++p;
|
||||
} else
|
||||
if(flags & 16){
|
||||
padding = p[0] | (p[1] << 8);
|
||||
p += 2;
|
||||
}
|
||||
time = *((unsigned long*)p);
|
||||
p += 4;
|
||||
duration = *((unsigned short*)p);
|
||||
p += 2;
|
||||
if(flags & 1){
|
||||
segs = p[0] - 0x80;
|
||||
++p;
|
||||
}
|
||||
printf("%08X: flag=%02X segs=%d pad=%d time=%ld dur=%d\n",
|
||||
fpos, flags, segs, padding, time, duration);
|
||||
for(seg = 0; seg < segs; seg++){
|
||||
ASF_segmhdr_t* sh = (ASF_segmhdr_t*)p;
|
||||
int len = 0;
|
||||
p += sizeof(ASF_segmhdr_t);
|
||||
if(sh->flag & 8) p+=8;// else
|
||||
if(sh->flag & 1) ++p;
|
||||
if(flags & 1){
|
||||
len = *((unsigned short*)p);
|
||||
p += 2;
|
||||
}
|
||||
printf(" seg #%d: streamno=%d seq=%d flag=%02X len=%d\n",
|
||||
seg, sh->streamno&0x7F, sh->seq, sh->flag, len);
|
||||
#ifdef SAVE_STREAMS
|
||||
if(!streams[sh->streamno & 0x7F]){
|
||||
char name[256];
|
||||
snprintf(name, 256, "stream%02X.dat", sh->streamno & 0x7F);
|
||||
streams[sh->streamno & 0x7F] = fopen(name, "wb");
|
||||
}
|
||||
fwrite(p, len, 1, streams[sh->streamno & 0x7F]);
|
||||
#endif
|
||||
p += len;
|
||||
}
|
||||
} else
|
||||
printf("%08X: UNKNOWN %02X %02X %02X %02X %02X...\n", fpos,
|
||||
packet[0], packet[1], packet[2], packet[3], packet[4]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//case 0x33000890:
|
||||
// return "guid_index_chunk";
|
||||
|
||||
}
|
||||
fseek(f, pos + objh.size - sizeof(objh), SEEK_SET);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
29
command.c
29
command.c
@ -452,6 +452,17 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg,
|
||||
return M_PROPERTY_OK;
|
||||
}
|
||||
|
||||
/// Number of chapters in file
|
||||
static int mp_property_chapters(m_option_t *prop, int action, void *arg,
|
||||
MPContext *mpctx)
|
||||
{
|
||||
if (!mpctx->demuxer)
|
||||
return M_PROPERTY_UNAVAILABLE;
|
||||
if (mpctx->demuxer->num_chapters == 0)
|
||||
stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_NUM_CHAPTERS, &mpctx->demuxer->num_chapters);
|
||||
return m_property_int_ro(prop, action, arg, mpctx->demuxer->num_chapters);
|
||||
}
|
||||
|
||||
/// Current dvd angle (RW)
|
||||
static int mp_property_angle(m_option_t *prop, int action, void *arg,
|
||||
MPContext *mpctx)
|
||||
@ -548,6 +559,12 @@ static int mp_property_metadata(m_option_t *prop, int action, void *arg,
|
||||
return M_PROPERTY_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static int mp_property_pause(m_option_t * prop, int action, void *arg,
|
||||
MPContext * mpctx)
|
||||
{
|
||||
return m_property_flag_ro(prop, action, arg, mpctx->osd_function == OSD_PAUSE);
|
||||
}
|
||||
|
||||
|
||||
///@}
|
||||
|
||||
@ -1992,10 +2009,14 @@ static const m_option_t mp_properties[] = {
|
||||
M_OPT_MIN, 0, 0, NULL },
|
||||
{ "chapter", mp_property_chapter, CONF_TYPE_INT,
|
||||
M_OPT_MIN, 1, 0, NULL },
|
||||
{ "chapters", mp_property_chapters, CONF_TYPE_INT,
|
||||
0, 0, 0, NULL },
|
||||
{ "angle", mp_property_angle, CONF_TYPE_INT,
|
||||
CONF_RANGE, -2, 10, NULL },
|
||||
{ "metadata", mp_property_metadata, CONF_TYPE_STRING_LIST,
|
||||
0, 0, 0, NULL },
|
||||
{ "pause", mp_property_pause, CONF_TYPE_FLAG,
|
||||
M_OPT_RANGE, 0, 1, NULL },
|
||||
|
||||
// Audio
|
||||
{ "volume", mp_property_volume, CONF_TYPE_FLOAT,
|
||||
@ -2624,7 +2645,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
play_tree_add_file(e, cmd->args[0].v.s);
|
||||
|
||||
if (cmd->args[1].v.i) // append
|
||||
play_tree_append_entry(mpctx->playtree, e);
|
||||
play_tree_append_entry(mpctx->playtree->child, e);
|
||||
else {
|
||||
// Go back to the starting point.
|
||||
while (play_tree_iter_up_step
|
||||
@ -2632,7 +2653,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
/* NOP */ ;
|
||||
play_tree_free_list(mpctx->playtree->child, 1);
|
||||
play_tree_set_child(mpctx->playtree, e);
|
||||
play_tree_iter_step(mpctx->playtree_iter, 0, 0);
|
||||
pt_iter_goto_head(mpctx->playtree_iter);
|
||||
mpctx->stop_play = PT_NEXT_SRC;
|
||||
}
|
||||
brk_cmd = 1;
|
||||
@ -2646,7 +2667,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
MSGTR_PlaylistLoadUnable, cmd->args[0].v.s);
|
||||
else {
|
||||
if (cmd->args[1].v.i) // append
|
||||
play_tree_append_entry(mpctx->playtree, e);
|
||||
play_tree_append_entry(mpctx->playtree->child, e);
|
||||
else {
|
||||
// Go back to the starting point.
|
||||
while (play_tree_iter_up_step
|
||||
@ -2655,7 +2676,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
/* NOP */ ;
|
||||
play_tree_free_list(mpctx->playtree->child, 1);
|
||||
play_tree_set_child(mpctx->playtree, e);
|
||||
play_tree_iter_step(mpctx->playtree_iter, 0, 0);
|
||||
pt_iter_goto_head(mpctx->playtree_iter);
|
||||
mpctx->stop_play = PT_NEXT_SRC;
|
||||
}
|
||||
}
|
||||
|
2
configure
vendored
2
configure
vendored
@ -1362,7 +1362,7 @@ if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then
|
||||
fi
|
||||
|
||||
|
||||
_inc_extra="$_inc_extra -I."
|
||||
_inc_extra="-I. $_inc_extra"
|
||||
_timer=timer-linux.c
|
||||
_getch=getch2.c
|
||||
if freebsd ; then
|
||||
|
@ -66,6 +66,15 @@ videocodec zmbv
|
||||
dll "zmbv.dll"
|
||||
out BGR24,BGR15,BGR8 query,flip
|
||||
|
||||
videocodec blackmagic
|
||||
info "Blackmagic 10-bit"
|
||||
status working
|
||||
comment "requires libguide40.dll"
|
||||
fourcc r210
|
||||
driver vfw
|
||||
dll "BMDCodecLib.dll"
|
||||
out BGR32,RGB32
|
||||
|
||||
; MPEG-1/2 decoding:
|
||||
; Note: mpegpes is preferred for hw decoders:
|
||||
|
||||
@ -1514,6 +1523,7 @@ videocodec ffrv20
|
||||
info "FFmpeg RV20 decoder"
|
||||
status working
|
||||
fourcc RV20,rv20
|
||||
fourcc RVTR
|
||||
driver ffmpeg
|
||||
dll rv20
|
||||
out YV12,I420,IYUV
|
||||
|
@ -762,6 +762,9 @@ mp_input_parse_cmd(char* str) {
|
||||
} else if (strncmp(str, "pausing_toggle ", 15) == 0) {
|
||||
pausing = 3;
|
||||
str = &str[15];
|
||||
} else if (strncmp(str, "pausing_keep_force ", 19) == 0) {
|
||||
pausing = 4;
|
||||
str = &str[19];
|
||||
}
|
||||
|
||||
for(ptr = str ; ptr[0] != '\0' && ptr[0] != '\t' && ptr[0] != ' ' ; ptr++)
|
||||
|
@ -499,7 +499,6 @@ static int demux_asf_fill_buffer(demuxer_t *demux, demux_stream_t *ds){
|
||||
p++;
|
||||
//printf(" group part: %d bytes\n",len2);
|
||||
if(len2 > len - 1 || len2 < 0) break; // Not enough data
|
||||
if(len2 == 0) continue;
|
||||
len2 = FFMIN(len2, asf->packetsize);
|
||||
demux_asf_read_packet(demux,p,len2,streamno,seq,x,duration,-1,keyframe);
|
||||
p+=len2;
|
||||
|
@ -947,6 +947,7 @@ got_video:
|
||||
// last fragment!
|
||||
if(dp_hdr->len!=vpkg_length-vpkg_offset)
|
||||
mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,vpkg_length-vpkg_offset);
|
||||
if (vpkg_offset > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) vpkg_offset = dp->len - sizeof(dp_hdr_t) - dp_hdr->len;
|
||||
stream_read(demuxer->stream, dp_data+dp_hdr->len, vpkg_offset);
|
||||
if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else
|
||||
dp_hdr->len+=vpkg_offset;
|
||||
@ -970,6 +971,7 @@ got_video:
|
||||
// non-last fragment:
|
||||
if(dp_hdr->len!=vpkg_offset)
|
||||
mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d offset=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,len,vpkg_length);
|
||||
if (len > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) len = dp->len - sizeof(dp_hdr_t) - dp_hdr->len;
|
||||
stream_read(demuxer->stream, dp_data+dp_hdr->len, len);
|
||||
if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else
|
||||
dp_hdr->len+=len;
|
||||
@ -992,6 +994,7 @@ got_video:
|
||||
extra[0]=1; extra[1]=0; // offset of the first chunk
|
||||
if(0x00==(vpkg_header&0xc0)){
|
||||
// first fragment:
|
||||
if (len > dp->len - sizeof(dp_hdr_t)) len = dp->len - sizeof(dp_hdr_t);
|
||||
dp_hdr->len=len;
|
||||
stream_read(demuxer->stream, dp_data, len);
|
||||
ds->asf_packet=dp;
|
||||
|
@ -152,7 +152,7 @@
|
||||
if (accel & MPEG2_ACCEL_PPC_ALTIVEC)
|
||||
mpeg2_mc = mpeg2_mc_altivec;
|
||||
else
|
||||
@@ -52,15 +62,20 @@
|
||||
@@ -52,15 +62,15 @@
|
||||
mpeg2_mc = mpeg2_mc_alpha;
|
||||
else
|
||||
#endif
|
||||
@ -164,11 +164,6 @@
|
||||
#endif
|
||||
#ifdef ARCH_ARM
|
||||
- if (accel & MPEG2_ACCEL_ARM) {
|
||||
+#ifdef HAVE_IWMMXT
|
||||
+ if (accel & MPEG2_ACCEL_ARM_IWMMXT)
|
||||
+ mpeg2_mc = mpeg2_mc_iwmmxt;
|
||||
+ else
|
||||
+#endif
|
||||
+ if (accel & MPEG2_ACCEL_ARM)
|
||||
mpeg2_mc = mpeg2_mc_arm;
|
||||
- } else
|
||||
@ -176,16 +171,6 @@
|
||||
#endif
|
||||
mpeg2_mc = mpeg2_mc_c;
|
||||
}
|
||||
--- include/mpeg2.h 2006-06-16 20:12:26.000000000 +0200
|
||||
+++ libmpeg2/mpeg2.h 2006-06-16 20:12:50.000000000 +0200
|
||||
@@ -164,6 +168,7 @@
|
||||
#define MPEG2_ACCEL_SPARC_VIS 1
|
||||
#define MPEG2_ACCEL_SPARC_VIS2 2
|
||||
#define MPEG2_ACCEL_ARM 1
|
||||
+#define MPEG2_ACCEL_ARM_IWMMXT 2
|
||||
#define MPEG2_ACCEL_DETECT 0x80000000
|
||||
|
||||
uint32_t mpeg2_accel (uint32_t accel);
|
||||
--- libmpeg2/mpeg2_internal.h 2006-06-16 20:12:26.000000000 +0200
|
||||
+++ libmpeg2/mpeg2_internal.h 2006-06-16 20:12:50.000000000 +0200
|
||||
@@ -152,6 +156,11 @@
|
||||
@ -210,13 +195,6 @@
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -313,5 +325,6 @@
|
||||
extern mpeg2_mc_t mpeg2_mc_alpha;
|
||||
extern mpeg2_mc_t mpeg2_mc_vis;
|
||||
extern mpeg2_mc_t mpeg2_mc_arm;
|
||||
+extern mpeg2_mc_t mpeg2_mc_iwmmxt;
|
||||
|
||||
#endif /* LIBMPEG2_MPEG2_INTERNAL_H */
|
||||
--- libmpeg2/slice.c 2006-06-16 20:12:26.000000000 +0200
|
||||
+++ libmpeg2/slice.c 2006-06-16 20:12:50.000000000 +0200
|
||||
@@ -142,6 +146,7 @@
|
||||
@ -252,67 +230,3 @@
|
||||
decoder->offset += 16; \
|
||||
if (decoder->offset == decoder->width) { \
|
||||
do { /* just so we can use the break statement */ \
|
||||
Index: libmpeg2/motion_comp_iwmmxt.c
|
||||
===================================================================
|
||||
--- libmpeg2/motion_comp_iwmmxt.c (revision 0)
|
||||
+++ libmpeg2/motion_comp_iwmmxt.c (revision 0)
|
||||
@@ -0,0 +1,59 @@
|
||||
+/*
|
||||
+ * motion_comp_iwmmxt.c
|
||||
+ * Copyright (C) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
|
||||
+ *
|
||||
+ * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
|
||||
+ * See http://libmpeg2.sourceforge.net/ for updates.
|
||||
+ *
|
||||
+ * mpeg2dec is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * mpeg2dec is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+#include "config.h"
|
||||
+
|
||||
+#if defined(ARCH_ARM) && defined(HAVE_IWMMXT)
|
||||
+
|
||||
+#include <inttypes.h>
|
||||
+
|
||||
+#include "mpeg2.h"
|
||||
+#include "attributes.h"
|
||||
+#include "mpeg2_internal.h"
|
||||
+
|
||||
+/* defined in libavcodec */
|
||||
+
|
||||
+extern void put_pixels16_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void put_pixels16_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void put_pixels16_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void put_pixels16_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void put_pixels8_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void put_pixels8_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void put_pixels8_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void put_pixels8_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels16_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels16_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels16_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels16_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels8_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels8_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels8_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+extern void avg_pixels8_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
+
|
||||
+mpeg2_mc_t mpeg2_mc_iwmmxt = {
|
||||
+ {put_pixels16_iwmmxt, put_pixels16_x2_iwmmxt, put_pixels16_y2_iwmmxt, put_pixels16_xy2_iwmmxt,
|
||||
+ put_pixels8_iwmmxt, put_pixels8_x2_iwmmxt, put_pixels8_y2_iwmmxt, put_pixels8_xy2_iwmmxt}, \
|
||||
+ {avg_pixels16_iwmmxt, avg_pixels16_x2_iwmmxt, avg_pixels16_y2_iwmmxt, avg_pixels16_xy2_iwmmxt,
|
||||
+ avg_pixels8_iwmmxt, avg_pixels8_x2_iwmmxt, avg_pixels8_y2_iwmmxt, avg_pixels8_xy2_iwmmxt}, \
|
||||
+};
|
||||
+
|
||||
+#endif /* defined(ARCH_ARM) && defined(HAVE_IWMMXT) */
|
||||
|
@ -68,11 +68,6 @@ void mpeg2_mc_init (uint32_t accel)
|
||||
else
|
||||
#endif
|
||||
#ifdef ARCH_ARM
|
||||
#ifdef HAVE_IWMMXT
|
||||
if (accel & MPEG2_ACCEL_ARM_IWMMXT)
|
||||
mpeg2_mc = mpeg2_mc_iwmmxt;
|
||||
else
|
||||
#endif
|
||||
if (accel & MPEG2_ACCEL_ARM)
|
||||
mpeg2_mc = mpeg2_mc_arm;
|
||||
else
|
||||
|
@ -1,59 +0,0 @@
|
||||
/*
|
||||
* motion_comp_iwmmxt.c
|
||||
* Copyright (C) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
|
||||
*
|
||||
* This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
|
||||
* See http://libmpeg2.sourceforge.net/ for updates.
|
||||
*
|
||||
* mpeg2dec is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* mpeg2dec is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ARCH_ARM) && defined(HAVE_IWMMXT)
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "mpeg2.h"
|
||||
#include "attributes.h"
|
||||
#include "mpeg2_internal.h"
|
||||
|
||||
/* defined in libavcodec */
|
||||
|
||||
extern void put_pixels16_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void put_pixels16_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void put_pixels16_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void put_pixels16_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void put_pixels8_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void put_pixels8_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void put_pixels8_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void put_pixels8_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels16_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels16_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels16_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels16_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels8_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels8_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels8_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
extern void avg_pixels8_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height);
|
||||
|
||||
mpeg2_mc_t mpeg2_mc_iwmmxt = {
|
||||
{put_pixels16_iwmmxt, put_pixels16_x2_iwmmxt, put_pixels16_y2_iwmmxt, put_pixels16_xy2_iwmmxt,
|
||||
put_pixels8_iwmmxt, put_pixels8_x2_iwmmxt, put_pixels8_y2_iwmmxt, put_pixels8_xy2_iwmmxt}, \
|
||||
{avg_pixels16_iwmmxt, avg_pixels16_x2_iwmmxt, avg_pixels16_y2_iwmmxt, avg_pixels16_xy2_iwmmxt,
|
||||
avg_pixels8_iwmmxt, avg_pixels8_x2_iwmmxt, avg_pixels8_y2_iwmmxt, avg_pixels8_xy2_iwmmxt}, \
|
||||
};
|
||||
|
||||
#endif /* defined(ARCH_ARM) && defined(HAVE_IWMMXT) */
|
@ -168,7 +168,6 @@ void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf);
|
||||
#define MPEG2_ACCEL_SPARC_VIS 1
|
||||
#define MPEG2_ACCEL_SPARC_VIS2 2
|
||||
#define MPEG2_ACCEL_ARM 1
|
||||
#define MPEG2_ACCEL_ARM_IWMMXT 2
|
||||
#define MPEG2_ACCEL_DETECT 0x80000000
|
||||
|
||||
uint32_t mpeg2_accel (uint32_t accel);
|
||||
|
@ -325,6 +325,5 @@ extern mpeg2_mc_t mpeg2_mc_altivec;
|
||||
extern mpeg2_mc_t mpeg2_mc_alpha;
|
||||
extern mpeg2_mc_t mpeg2_mc_vis;
|
||||
extern mpeg2_mc_t mpeg2_mc_arm;
|
||||
extern mpeg2_mc_t mpeg2_mc_iwmmxt;
|
||||
|
||||
#endif /* LIBMPEG2_MPEG2_INTERNAL_H */
|
||||
|
@ -133,14 +133,11 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat
|
||||
ssdU/= w*h/4;
|
||||
ssdV/= w*h/4;
|
||||
|
||||
if (ssdY>100 || ssdU>100 || ssdV>100){
|
||||
printf(" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5lld,%5lld,%5lld\n",
|
||||
sws_format_name(srcFormat), srcW, srcH,
|
||||
sws_format_name(dstFormat), dstW, dstH,
|
||||
flags,
|
||||
ssdY, ssdU, ssdV);
|
||||
fflush(stdout);
|
||||
}
|
||||
printf(" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5lld,%5lld,%5lld\n",
|
||||
sws_format_name(srcFormat), srcW, srcH,
|
||||
sws_format_name(dstFormat), dstW, dstH,
|
||||
flags, ssdY, ssdU, ssdV);
|
||||
fflush(stdout);
|
||||
|
||||
end:
|
||||
|
||||
@ -157,10 +154,6 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat
|
||||
return res;
|
||||
}
|
||||
|
||||
void fast_memcpy(void *a, void *b, int s){ //FIXME
|
||||
memcpy(a, b, s);
|
||||
}
|
||||
|
||||
static void selfTest(uint8_t *src[3], int stride[3], int w, int h){
|
||||
enum PixelFormat srcFormat, dstFormat;
|
||||
int srcW, srcH, dstW, dstH;
|
||||
|
@ -1229,7 +1229,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF
|
||||
else if (flags & SWS_SPLINE)
|
||||
{
|
||||
double p=-2.196152422706632;
|
||||
coeff = getSplineCoeff(1.0, 0.0, p, -p-1.0, d) * fone;
|
||||
coeff = getSplineCoeff(1.0, 0.0, p, -p-1.0, floatd) * fone;
|
||||
}
|
||||
else {
|
||||
coeff= 0.0; //GCC warning killer
|
||||
|
@ -350,22 +350,26 @@ static void getFunctions(void *(*getProcAddress)(const GLubyte *),
|
||||
* \brief create a texture and set some defaults
|
||||
* \param target texture taget, usually GL_TEXTURE_2D
|
||||
* \param fmt internal texture format
|
||||
* \param format texture host data format
|
||||
* \param type texture host data type
|
||||
* \param filter filter used for scaling, e.g. GL_LINEAR
|
||||
* \param w texture width
|
||||
* \param h texture height
|
||||
* \param val luminance value to fill texture with
|
||||
* \ingroup gltexture
|
||||
*/
|
||||
void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
|
||||
void glCreateClearTex(GLenum target, GLenum fmt, GLenum format, GLenum type, GLint filter,
|
||||
int w, int h, unsigned char val) {
|
||||
GLfloat fval = (GLfloat)val / 255.0;
|
||||
GLfloat border[4] = {fval, fval, fval, fval};
|
||||
GLenum clrfmt = (fmt == GL_ALPHA) ? GL_ALPHA : GL_LUMINANCE;
|
||||
char *init = malloc(w * h);
|
||||
memset(init, val, w * h);
|
||||
glAdjustAlignment(w);
|
||||
int stride = w * glFmt2bpp(format, type);
|
||||
char *init;
|
||||
if (!stride) return;
|
||||
init = malloc(stride * h);
|
||||
memset(init, val, stride * h);
|
||||
glAdjustAlignment(stride);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, w);
|
||||
glTexImage2D(target, 0, fmt, w, h, 0, clrfmt, GL_UNSIGNED_BYTE, init);
|
||||
glTexImage2D(target, 0, fmt, w, h, 0, format, type, init);
|
||||
glTexParameterf(target, GL_TEXTURE_PRIORITY, 1.0);
|
||||
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, filter);
|
||||
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, filter);
|
||||
@ -412,6 +416,7 @@ int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
|
||||
FILE *f, int *width, int *height, int *maxval) {
|
||||
unsigned w, h, m, val, bpp;
|
||||
char *data;
|
||||
GLenum type;
|
||||
ppm_skip(f);
|
||||
if (fgetc(f) != 'P' || fgetc(f) != '6')
|
||||
return 0;
|
||||
@ -438,8 +443,9 @@ int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
|
||||
if (fmt == GL_FLOAT_RGB32_NV && target != GL_TEXTURE_RECTANGLE)
|
||||
fmt = GL_RGB16;
|
||||
}
|
||||
glCreateClearTex(target, fmt, filter, w, h, 0);
|
||||
glUploadTex(target, GL_RGB, (m > 255) ? GL_UNSIGNED_SHORT : GL_UNSIGNED_BYTE,
|
||||
type = m > 255 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_BYTE;
|
||||
glCreateClearTex(target, fmt, GL_RGB, type, filter, w, h, 0);
|
||||
glUploadTex(target, GL_RGB, type,
|
||||
data, w * bpp, 0, 0, w, h, 0);
|
||||
free(data);
|
||||
if (width) *width = w;
|
||||
@ -981,7 +987,7 @@ static void create_conv_textures(gl_conversion_params_t *params, int *texu, char
|
||||
gen_gamma_map(lookup_data, LOOKUP_RES, params->rgamma);
|
||||
gen_gamma_map(&lookup_data[LOOKUP_RES], LOOKUP_RES, params->ggamma);
|
||||
gen_gamma_map(&lookup_data[2 * LOOKUP_RES], LOOKUP_RES, params->bgamma);
|
||||
glCreateClearTex(GL_TEXTURE_2D, GL_LUMINANCE8, GL_LINEAR,
|
||||
glCreateClearTex(GL_TEXTURE_2D, GL_LUMINANCE8, GL_LUMINANCE, GL_UNSIGNED_BYTE, GL_LINEAR,
|
||||
LOOKUP_RES, 4, 0);
|
||||
glUploadTex(GL_TEXTURE_2D, GL_LUMINANCE, GL_UNSIGNED_BYTE, lookup_data,
|
||||
LOOKUP_RES, 0, 0, LOOKUP_RES, 4, 0);
|
||||
|
@ -210,7 +210,7 @@ const char *glValName(GLint value);
|
||||
int glFindFormat(uint32_t format, int *bpp, GLint *gl_texfmt,
|
||||
GLenum *gl_format, GLenum *gl_type);
|
||||
int glFmt2bpp(GLenum format, GLenum type);
|
||||
void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
|
||||
void glCreateClearTex(GLenum target, GLenum fmt, GLenum format, GLenum type, GLint filter,
|
||||
int w, int h, unsigned char val);
|
||||
int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
|
||||
FILE *f, int *width, int *height, int *maxval);
|
||||
|
@ -281,9 +281,9 @@ static void genEOSD(mp_eosd_images_t *imgs) {
|
||||
if (!largeeosdtex[0]) {
|
||||
glGenTextures(2, largeeosdtex);
|
||||
BindTexture(gl_target, largeeosdtex[0]);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, scale_type, 512, 512, 0);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, 512, 512, 0);
|
||||
BindTexture(gl_target, largeeosdtex[1]);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, scale_type, 512, 512, 0);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, 512, 512, 0);
|
||||
}
|
||||
for (i = img; i; i = i->next)
|
||||
{
|
||||
@ -322,7 +322,7 @@ static void genEOSD(mp_eosd_images_t *imgs) {
|
||||
} else {
|
||||
texSize(i->w, i->h, &sx, &sy);
|
||||
BindTexture(gl_target, *curtex++);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, scale_type, sx, sy, 0);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, sx, sy, 0);
|
||||
}
|
||||
glUploadTex(gl_target, GL_ALPHA, GL_UNSIGNED_BYTE, i->bitmap, i->stride,
|
||||
x, y, i->w, i->h, 0);
|
||||
@ -412,10 +412,10 @@ static int initGl(uint32_t d_width, uint32_t d_height) {
|
||||
BindTexture(GL_TEXTURE_3D, default_texs[i + 14]);
|
||||
}
|
||||
ActiveTexture(GL_TEXTURE1);
|
||||
glCreateClearTex(gl_target, gl_texfmt, GL_LINEAR,
|
||||
glCreateClearTex(gl_target, gl_texfmt, gl_format, gl_type, GL_LINEAR,
|
||||
texture_width / 2, texture_height / 2, 128);
|
||||
ActiveTexture(GL_TEXTURE2);
|
||||
glCreateClearTex(gl_target, gl_texfmt, GL_LINEAR,
|
||||
glCreateClearTex(gl_target, gl_texfmt, gl_format, gl_type, GL_LINEAR,
|
||||
texture_width / 2, texture_height / 2, 128);
|
||||
switch (use_yuv) {
|
||||
case YUV_CONVERSION_FRAGMENT_LOOKUP:
|
||||
@ -433,7 +433,7 @@ static int initGl(uint32_t d_width, uint32_t d_height) {
|
||||
BindTexture(gl_target, 0);
|
||||
update_yuvconv();
|
||||
}
|
||||
glCreateClearTex(gl_target, gl_texfmt, GL_LINEAR,
|
||||
glCreateClearTex(gl_target, gl_texfmt, gl_format, gl_type, GL_LINEAR,
|
||||
texture_width, texture_height, 0);
|
||||
|
||||
resize(d_width, d_height);
|
||||
@ -537,14 +537,14 @@ static void create_osd_texture(int x0, int y0, int w, int h,
|
||||
// create Textures for OSD part
|
||||
glGenTextures(1, &osdtex[osdtexCnt]);
|
||||
BindTexture(gl_target, osdtex[osdtexCnt]);
|
||||
glCreateClearTex(gl_target, GL_LUMINANCE, scale_type, sx, sy, 0);
|
||||
glCreateClearTex(gl_target, GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE, scale_type, sx, sy, 0);
|
||||
glUploadTex(gl_target, GL_LUMINANCE, GL_UNSIGNED_BYTE, src, stride,
|
||||
0, 0, w, h, 0);
|
||||
|
||||
#ifndef FAST_OSD
|
||||
glGenTextures(1, &osdatex[osdtexCnt]);
|
||||
BindTexture(gl_target, osdatex[osdtexCnt]);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, scale_type, sx, sy, 255);
|
||||
glCreateClearTex(gl_target, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, scale_type, sx, sy, 255);
|
||||
{
|
||||
int i;
|
||||
char *tmp = malloc(stride * h);
|
||||
|
@ -256,16 +256,16 @@ static int initTextures(void)
|
||||
ActiveTexture(GL_TEXTURE0);
|
||||
}
|
||||
|
||||
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, GL_LINEAR,
|
||||
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR,
|
||||
texture_width, texture_height, 0);
|
||||
|
||||
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
if (image_format == IMGFMT_YV12) {
|
||||
ActiveTexture(GL_TEXTURE1);
|
||||
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, GL_LINEAR,
|
||||
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR,
|
||||
texture_width / 2, texture_height / 2, 128);
|
||||
ActiveTexture(GL_TEXTURE2);
|
||||
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, GL_LINEAR,
|
||||
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR,
|
||||
texture_width / 2, texture_height / 2, 128);
|
||||
ActiveTexture(GL_TEXTURE0);
|
||||
}
|
||||
|
15
m_property.c
15
m_property.c
@ -245,6 +245,17 @@ int m_property_choice(const m_option_t* prop,int action,
|
||||
return m_property_int_range(prop,action,arg,var);
|
||||
}
|
||||
|
||||
int m_property_flag_ro(const m_option_t* prop,int action,
|
||||
void* arg,int var) {
|
||||
switch(action) {
|
||||
case M_PROPERTY_PRINT:
|
||||
if(!arg) return 0;
|
||||
*(char**)arg = strdup((var > prop->min) ? MSGTR_Enabled : MSGTR_Disabled);
|
||||
return 1;
|
||||
}
|
||||
return m_property_int_ro(prop,action,arg,var);
|
||||
}
|
||||
|
||||
int m_property_flag(const m_option_t* prop,int action,
|
||||
void* arg,int* var) {
|
||||
switch(action) {
|
||||
@ -253,9 +264,7 @@ int m_property_flag(const m_option_t* prop,int action,
|
||||
*var = *var == prop->min ? prop->max : prop->min;
|
||||
return 1;
|
||||
case M_PROPERTY_PRINT:
|
||||
if(!arg) return 0;
|
||||
*(char**)arg = strdup((*var > prop->min) ? MSGTR_Enabled : MSGTR_Disabled);
|
||||
return 1;
|
||||
return m_property_flag_ro(prop, action, arg, *var);
|
||||
}
|
||||
return m_property_int_range(prop,action,arg,var);
|
||||
}
|
||||
|
@ -169,6 +169,9 @@ int m_property_int_range(const m_option_t* prop,int action,
|
||||
int m_property_choice(const m_option_t* prop,int action,
|
||||
void* arg,int* var);
|
||||
|
||||
int m_property_flag_ro(const m_option_t* prop,int action,
|
||||
void* arg,int var);
|
||||
|
||||
/// Switch betwen min and max.
|
||||
int m_property_flag(const m_option_t* prop,int action,
|
||||
void* arg,int* var);
|
||||
|
10
mplayer.c
10
mplayer.c
@ -2349,9 +2349,10 @@ static void pause_loop(struct MPContext *mpctx)
|
||||
mpctx->audio_out->pause(); // pause audio, keep data if possible
|
||||
|
||||
while ( (cmd = mp_input_get_cmd(mpctx->input, 20, 1, 1)) == NULL
|
||||
|| cmd->id == MP_CMD_SET_MOUSE_POS) {
|
||||
|| cmd->id == MP_CMD_SET_MOUSE_POS || cmd->pausing == 4) {
|
||||
if (cmd) {
|
||||
cmd = mp_input_get_cmd(mpctx->input, 0,1,0);
|
||||
run_command(mpctx, cmd);
|
||||
mp_cmd_free(cmd);
|
||||
continue;
|
||||
}
|
||||
@ -3559,6 +3560,11 @@ if (mpctx->global_sub_size) {
|
||||
}
|
||||
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_LENGTH=%.2lf\n", demuxer_get_time_length(mpctx->demuxer));
|
||||
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_SEEKABLE=%d\n", mpctx->stream->seek ? 1 : 0);
|
||||
if (mpctx->demuxer) {
|
||||
if (mpctx->demuxer->num_chapters == 0)
|
||||
stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_NUM_CHAPTERS, &mpctx->demuxer->num_chapters);
|
||||
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_CHAPTERS=%d\n", mpctx->demuxer->num_chapters);
|
||||
}
|
||||
|
||||
if(!mpctx->sh_video) goto main; // audio-only
|
||||
|
||||
@ -3864,8 +3870,8 @@ if(auto_quality>0){
|
||||
current_module="pause";
|
||||
|
||||
if (mpctx->osd_function == OSD_PAUSE) {
|
||||
pause_loop(mpctx);
|
||||
mpctx->was_paused = 1;
|
||||
pause_loop(mpctx);
|
||||
}
|
||||
|
||||
// handle -sstep
|
||||
|
@ -883,7 +883,7 @@ static HRESULT load_freq_table(int nCountry, int nInputType,
|
||||
TRCCountryList *pCountryList;
|
||||
int i, index;
|
||||
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: load_freq_table called %d (%d)\n",nCountry,nInputType);
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: load_freq_table called %d (%s)\n",nCountry,nInputType == TunerInputAntenna ? "broadcast" : "cable");
|
||||
/* ASSERT(sizeof(TRCCountryList)==10); // need properly aligned structure */
|
||||
|
||||
if (!pplFreqTable || !pnFirst || !pnLen)
|
||||
@ -926,6 +926,7 @@ static HRESULT load_freq_table(int nCountry, int nInputType,
|
||||
}
|
||||
for (i = 0; i < *pnLen; i++) {
|
||||
(*pplFreqTable)[i] = plFreqTable[i + 2];
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: load_freq_table #%d => (%ld)\n",i+*pnFirst,(*pplFreqTable)[i]);
|
||||
}
|
||||
FreeLibrary(hDLL);
|
||||
return S_OK;
|
||||
@ -1028,7 +1029,7 @@ static HRESULT set_nearest_freq(priv_t * priv, long lFreq)
|
||||
TunerInputType tunerInput;
|
||||
long lInput;
|
||||
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: set_nearest_freq called\n");
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: set_nearest_freq called: %ld\n", lFreq);
|
||||
if(priv->freq_table_len == -1 && !priv->freq_table) {
|
||||
|
||||
hr = OLE_CALL_ARGS(priv->pTVTuner, get_ConnectInput, &lInput);
|
||||
@ -1058,11 +1059,13 @@ static HRESULT set_nearest_freq(priv_t * priv, long lFreq)
|
||||
nChannel = priv->first_channel + i;
|
||||
lFreqDiff = labs(lFreq - priv->freq_table[i]);
|
||||
}
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: set_nearest_freq #%d (%ld) => %d (%ld)\n",i+priv->first_channel,priv->freq_table[i], nChannel,lFreqDiff);
|
||||
}
|
||||
if (nChannel == -1) {
|
||||
mp_msg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_UnableFindNearestChannel);
|
||||
return E_FAIL;
|
||||
}
|
||||
mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: set_nearest_freq #%d (%ld)\n",nChannel,priv->freq_table[nChannel - priv->first_channel]);
|
||||
hr = OLE_CALL_ARGS(priv->pTVTuner, put_Channel, nChannel,
|
||||
AMTUNER_SUBCHAN_DEFAULT, AMTUNER_SUBCHAN_DEFAULT);
|
||||
if (FAILED(hr)) {
|
||||
@ -1087,7 +1090,7 @@ static int set_frequency(priv_t * priv, long lFreq)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: set_frequency called\n");
|
||||
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: set_frequency called: %ld\n", lFreq);
|
||||
if (!priv->pTVTuner)
|
||||
return TVI_CONTROL_FALSE;
|
||||
if (priv->direct_setfreq_call) { //using direct call to set frequency
|
||||
@ -3478,7 +3481,7 @@ static int control(priv_t * priv, int cmd, void *arg)
|
||||
return TVI_CONTROL_FALSE;
|
||||
|
||||
ret = get_frequency(priv, &lFreq);
|
||||
lFreq = lFreq * 16 / 1000000; //convert from Hz to 1/16 MHz units
|
||||
lFreq = lFreq / (1000000/16); //convert from Hz to 1/16 MHz units
|
||||
|
||||
*(unsigned long *) arg = lFreq;
|
||||
return ret;
|
||||
@ -3489,7 +3492,7 @@ static int control(priv_t * priv, int cmd, void *arg)
|
||||
if (!priv->pTVTuner)
|
||||
return TVI_CONTROL_FALSE;
|
||||
//convert to Hz
|
||||
nFreq = 1000000 * nFreq / 16; //convert from 1/16 MHz units to Hz
|
||||
nFreq = (1000000/16) * nFreq; //convert from 1/16 MHz units to Hz
|
||||
return set_frequency(priv, nFreq);
|
||||
}
|
||||
case TVI_CONTROL_VID_SET_HUE:
|
||||
|
@ -90,7 +90,7 @@ static vidix_capability_t ivtv_cap =
|
||||
};
|
||||
|
||||
static void de_macro_y(unsigned char *src, unsigned char *dst,
|
||||
unsigned int w, unsigned int h, int src_x, int src_y, int height __attribute__ ((unused)), int width)
|
||||
unsigned int w, unsigned int h, int src_x, int src_y, int height, int width)
|
||||
{
|
||||
unsigned int x, y, i;
|
||||
unsigned char *dst_2;
|
||||
@ -221,7 +221,7 @@ static void de_macro_uv(unsigned char *srcu, unsigned char *srcv,
|
||||
}
|
||||
}
|
||||
|
||||
int ivtv_probe(int verbose,int force __attribute__ ((unused)))
|
||||
int ivtv_probe(int verbose, int force)
|
||||
{
|
||||
unsigned char fb_number = 0;
|
||||
char *device_name = NULL;
|
||||
@ -356,7 +356,7 @@ yuv_found:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ivtv_init(const char *args __attribute__ ((unused)))
|
||||
int ivtv_init(const char *args)
|
||||
{
|
||||
if(ivtv_verbose)
|
||||
printf(IVTV_MSG"init\n");
|
||||
|
@ -92,7 +92,7 @@ static int find_chip(unsigned int vendor, uint32_t chip_id)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int pm2_probe(int verbose, int force __attribute__ ((unused)))
|
||||
static int pm2_probe(int verbose, int force)
|
||||
{
|
||||
pciinfo_t lst[MAX_PCI_DEVICES];
|
||||
unsigned i,num_pci;
|
||||
|
Loading…
Reference in New Issue
Block a user