mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +00:00
Add decoder logic
This commit is contained in:
parent
e8a936dfe4
commit
eab95f6389
1 changed files with 6 additions and 16 deletions
|
@ -30,6 +30,10 @@
|
|||
#include <Foundation/Foundation.h>
|
||||
#include "GNUstepGUI/GSVideoSource.h"
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
#define INBUF_SIZE 4096
|
||||
|
||||
@interface VideofileSource : NSObject <GSVideoSource>
|
||||
{
|
||||
NSData *_data;
|
||||
|
@ -81,25 +85,11 @@
|
|||
|
||||
_data = data;
|
||||
RETAIN(_data);
|
||||
|
||||
// _info.format = 0;
|
||||
/*
|
||||
_video = sf_open_virtual (&dataIO, SFM_READ, &_info, self);
|
||||
if (_video == NULL)
|
||||
{
|
||||
DESTROY(self);
|
||||
return nil;
|
||||
}
|
||||
*/
|
||||
|
||||
// Setup immutable values...
|
||||
/* FIXME: support multiple types */
|
||||
// _dur = (double)_info.frames / (double)_info.samplerate;
|
||||
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSUInteger)readBytes: (void *)bytes length: (NSUInteger)length
|
||||
- (NSUInteger) readBytes: (void *)bytes length: (NSUInteger)length
|
||||
{
|
||||
return 0; // (NSUInteger) (sf_read_short (_video, bytes, (length>>1))<<1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue