mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-19 05:06:25 -04:00
A few bugfixes
This commit is contained in:
parent
a89589033b
commit
0134ba96e3
@ -30,9 +30,9 @@ TypeHandle FfmpegAudio::_type_handle;
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
FfmpegAudio::
|
FfmpegAudio::
|
||||||
FfmpegAudio(const Filename &name) :
|
FfmpegAudio(const Filename &name) :
|
||||||
MovieAudio(name),
|
MovieAudio(name)
|
||||||
_specified_filename(name)
|
|
||||||
{
|
{
|
||||||
|
_filename = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -51,7 +51,13 @@ FfmpegAudio::
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
PT(MovieAudioCursor) FfmpegAudio::
|
PT(MovieAudioCursor) FfmpegAudio::
|
||||||
open() {
|
open() {
|
||||||
return new FfmpegAudioCursor(this);
|
PT(FfmpegAudioCursor) result = new FfmpegAudioCursor(this);
|
||||||
|
if (result->_format_ctx == 0) {
|
||||||
|
movies_cat.error() << "Could not open " << _filename << "\n";
|
||||||
|
return NULL;
|
||||||
|
} else {
|
||||||
|
return (MovieAudioCursor*)(FfmpegAudioCursor*)result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -36,7 +36,6 @@ PUBLISHED:
|
|||||||
virtual PT(MovieAudioCursor) open();
|
virtual PT(MovieAudioCursor) open();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Filename _specified_filename;
|
|
||||||
friend class FfmpegAudioCursor;
|
friend class FfmpegAudioCursor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -30,9 +30,15 @@ TypeHandle FfmpegAudioCursor::_type_handle;
|
|||||||
// Description: xxx
|
// Description: xxx
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
FfmpegAudioCursor::
|
FfmpegAudioCursor::
|
||||||
FfmpegAudioCursor(PT(FfmpegAudio) src) :
|
FfmpegAudioCursor(FfmpegAudio *src) :
|
||||||
MovieAudioCursor((MovieAudio*)(FfmpegAudio*)src),
|
MovieAudioCursor(src),
|
||||||
_filename(src->_specified_filename)
|
_filename(src->_filename),
|
||||||
|
_packet(0),
|
||||||
|
_packet_data(0),
|
||||||
|
_format_ctx(0),
|
||||||
|
_audio_ctx(0),
|
||||||
|
_buffer(0),
|
||||||
|
_buffer_alloc(0)
|
||||||
{
|
{
|
||||||
string url = "pandavfs:";
|
string url = "pandavfs:";
|
||||||
url += _filename;
|
url += _filename;
|
||||||
@ -211,25 +217,36 @@ reload_buffer() {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void FfmpegAudioCursor::
|
void FfmpegAudioCursor::
|
||||||
seek(double t) {
|
seek(double t) {
|
||||||
movies_cat.error() << "Seek not implemented yet.\n";
|
PN_int64 target_ts = (PN_int64)(t / _audio_timebase);
|
||||||
// PN_int64 target_ts = (PN_int64)(t / _audio_timebase);
|
if (target_ts < (PN_int64)(_initial_dts)) {
|
||||||
// if (target_ts < (PN_int64)(_initial_dts)) {
|
// Attempts to seek before the first packet will fail.
|
||||||
// // Attempts to seek before the first packet will fail.
|
target_ts = _initial_dts;
|
||||||
// target_ts = _initial_dts;
|
}
|
||||||
// }
|
if (av_seek_frame(_format_ctx, _audio_index, target_ts, AVSEEK_FLAG_BACKWARD) < 0) {
|
||||||
// if (av_seek_frame(_format_ctx, _audio_index, target_ts, AVSEEK_FLAG_BACKWARD) < 0) {
|
movies_cat.error() << "Seek failure. Shutting down movie.\n";
|
||||||
// if (t >= _packet_time) {
|
cleanup();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// movies_cat.error() << "Seek failure. Shutting down movie.\n";
|
avcodec_close(_audio_ctx);
|
||||||
// cleanup();
|
AVCodec *pAudioCodec=avcodec_find_decoder(_audio_ctx->codec_id);
|
||||||
// _packet_time = t;
|
if(pAudioCodec == 0) {
|
||||||
// return;
|
cleanup();
|
||||||
// }
|
return;
|
||||||
// fetch_packet(t);
|
}
|
||||||
// if (_packet_time > t) {
|
if(avcodec_open(_audio_ctx, pAudioCodec)<0) {
|
||||||
// _packet_time = t;
|
cleanup();
|
||||||
// }
|
return;
|
||||||
|
}
|
||||||
|
_buffer_head = 0;
|
||||||
|
_buffer_tail = 0;
|
||||||
|
fetch_packet();
|
||||||
|
double ts = _packet->dts * _audio_timebase;
|
||||||
|
if (t > ts) {
|
||||||
|
int skip = (int)((t-ts) * _audio_rate);
|
||||||
|
read_samples(skip, 0);
|
||||||
|
}
|
||||||
|
_last_seek = t;
|
||||||
|
_samples_read = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -250,8 +267,10 @@ read_samples(int n, PN_int16 *data) {
|
|||||||
int available = _buffer_tail - _buffer_head;
|
int available = _buffer_tail - _buffer_head;
|
||||||
int ncopy = (desired > available) ? available : desired;
|
int ncopy = (desired > available) ? available : desired;
|
||||||
if (ncopy) {
|
if (ncopy) {
|
||||||
memcpy(data, _buffer + _buffer_head, ncopy * 2);
|
if (data != 0) {
|
||||||
data += ncopy;
|
memcpy(data, _buffer + _buffer_head, ncopy * 2);
|
||||||
|
data += ncopy;
|
||||||
|
}
|
||||||
desired -= ncopy;
|
desired -= ncopy;
|
||||||
_buffer_head += ncopy;
|
_buffer_head += ncopy;
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,10 @@ struct AVPacket;
|
|||||||
// Description : A stream that generates a sequence of audio samples.
|
// Description : A stream that generates a sequence of audio samples.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDA_MOVIES FfmpegAudioCursor : public MovieAudioCursor {
|
class EXPCL_PANDA_MOVIES FfmpegAudioCursor : public MovieAudioCursor {
|
||||||
|
friend class FfmpegAudio;
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
FfmpegAudioCursor(PT(FfmpegAudio) src);
|
FfmpegAudioCursor(FfmpegAudio *src);
|
||||||
virtual ~FfmpegAudioCursor();
|
virtual ~FfmpegAudioCursor();
|
||||||
virtual void seek(double offset);
|
virtual void seek(double offset);
|
||||||
|
|
||||||
|
@ -30,9 +30,9 @@ TypeHandle FfmpegVideo::_type_handle;
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
FfmpegVideo::
|
FfmpegVideo::
|
||||||
FfmpegVideo(const Filename &name) :
|
FfmpegVideo(const Filename &name) :
|
||||||
MovieVideo(name),
|
MovieVideo(name)
|
||||||
_specified_filename(name)
|
|
||||||
{
|
{
|
||||||
|
_filename = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -51,7 +51,13 @@ FfmpegVideo::
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
PT(MovieVideoCursor) FfmpegVideo::
|
PT(MovieVideoCursor) FfmpegVideo::
|
||||||
open() {
|
open() {
|
||||||
return new FfmpegVideoCursor(this);
|
PT(FfmpegVideoCursor) result = new FfmpegVideoCursor(this);
|
||||||
|
if (result->_format_ctx == 0) {
|
||||||
|
movies_cat.error() << "Could not open " << _filename << "\n";
|
||||||
|
return NULL;
|
||||||
|
} else {
|
||||||
|
return (MovieVideoCursor*)(FfmpegVideoCursor*)result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ class EXPCL_PANDA_MOVIES FfmpegVideo : public MovieVideo {
|
|||||||
virtual PT(MovieVideoCursor) open();
|
virtual PT(MovieVideoCursor) open();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Filename _specified_filename;
|
|
||||||
friend class FfmpegVideoCursor;
|
friend class FfmpegVideoCursor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -41,14 +41,15 @@ TypeHandle FfmpegVideoCursor::_type_handle;
|
|||||||
// Description: xxx
|
// Description: xxx
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
FfmpegVideoCursor::
|
FfmpegVideoCursor::
|
||||||
FfmpegVideoCursor(PT(FfmpegVideo) src) :
|
FfmpegVideoCursor(FfmpegVideo *src) :
|
||||||
MovieVideoCursor((MovieVideo*)(FfmpegVideo*)src),
|
MovieVideoCursor(src),
|
||||||
_filename(src->_specified_filename),
|
_filename(src->_filename),
|
||||||
_format_ctx(0),
|
_format_ctx(0),
|
||||||
_video_index(-1),
|
_video_index(-1),
|
||||||
_video_ctx(0),
|
_video_ctx(0),
|
||||||
_frame(0),
|
_frame(0),
|
||||||
_frame_out(0),
|
_frame_out(0),
|
||||||
|
_packet(0),
|
||||||
_min_fseek(3.0)
|
_min_fseek(3.0)
|
||||||
{
|
{
|
||||||
string url = "pandavfs:";
|
string url = "pandavfs:";
|
||||||
@ -127,7 +128,15 @@ FfmpegVideoCursor::
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void FfmpegVideoCursor::
|
void FfmpegVideoCursor::
|
||||||
cleanup() {
|
cleanup() {
|
||||||
_frame_out->data[0] = 0;
|
if (_frame) {
|
||||||
|
av_free(_frame);
|
||||||
|
_frame = 0;
|
||||||
|
}
|
||||||
|
if (_frame_out) {
|
||||||
|
_frame_out->data[0] = 0;
|
||||||
|
av_free(_frame_out);
|
||||||
|
_frame_out = 0;
|
||||||
|
}
|
||||||
if (_packet) {
|
if (_packet) {
|
||||||
if (_packet->data) {
|
if (_packet->data) {
|
||||||
av_free_packet(_packet);
|
av_free_packet(_packet);
|
||||||
@ -143,14 +152,6 @@ cleanup() {
|
|||||||
av_close_input_file(_format_ctx);
|
av_close_input_file(_format_ctx);
|
||||||
_format_ctx = 0;
|
_format_ctx = 0;
|
||||||
}
|
}
|
||||||
if (_frame) {
|
|
||||||
av_free(_frame);
|
|
||||||
_frame = 0;
|
|
||||||
}
|
|
||||||
if (_frame_out) {
|
|
||||||
av_free(_frame_out);
|
|
||||||
_frame_out = 0;
|
|
||||||
}
|
|
||||||
_video_ctx = 0;
|
_video_ctx = 0;
|
||||||
_video_index = -1;
|
_video_index = -1;
|
||||||
}
|
}
|
||||||
@ -243,6 +244,16 @@ seek(double t) {
|
|||||||
_packet_time = t;
|
_packet_time = t;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
avcodec_close(_video_ctx);
|
||||||
|
AVCodec *pVideoCodec=avcodec_find_decoder(_video_ctx->codec_id);
|
||||||
|
if(pVideoCodec == 0) {
|
||||||
|
cleanup();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(avcodec_open(_video_ctx, pVideoCodec)<0) {
|
||||||
|
cleanup();
|
||||||
|
return;
|
||||||
|
}
|
||||||
fetch_packet(t);
|
fetch_packet(t);
|
||||||
if (_packet_time > t) {
|
if (_packet_time > t) {
|
||||||
_packet_time = t;
|
_packet_time = t;
|
||||||
|
@ -35,9 +35,10 @@ struct AVFrame;
|
|||||||
// Description :
|
// Description :
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDA_MOVIES FfmpegVideoCursor : public MovieVideoCursor {
|
class EXPCL_PANDA_MOVIES FfmpegVideoCursor : public MovieVideoCursor {
|
||||||
|
friend class FfmpegVideo;
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
FfmpegVideoCursor(PT(FfmpegVideo) src);
|
FfmpegVideoCursor(FfmpegVideo *src);
|
||||||
virtual ~FfmpegVideoCursor();
|
virtual ~FfmpegVideoCursor();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -56,8 +56,8 @@ static color colormap[17] = {
|
|||||||
// Description: xxx
|
// Description: xxx
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
InkblotVideoCursor::
|
InkblotVideoCursor::
|
||||||
InkblotVideoCursor(PT(InkblotVideo) src) :
|
InkblotVideoCursor(InkblotVideo *src) :
|
||||||
MovieVideoCursor((MovieVideo*)(InkblotVideo*)src)
|
MovieVideoCursor(src)
|
||||||
{
|
{
|
||||||
_size_x = src->_specified_x;
|
_size_x = src->_specified_x;
|
||||||
_size_y = src->_specified_y;
|
_size_y = src->_specified_y;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
class EXPCL_PANDA_MOVIES InkblotVideoCursor : public MovieVideoCursor {
|
class EXPCL_PANDA_MOVIES InkblotVideoCursor : public MovieVideoCursor {
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
InkblotVideoCursor(PT(InkblotVideo) src);
|
InkblotVideoCursor(InkblotVideo *src);
|
||||||
virtual ~InkblotVideoCursor();
|
virtual ~InkblotVideoCursor();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -16,3 +16,15 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: MovieAudio::get_filename
|
||||||
|
// Access: Published
|
||||||
|
// Description: Returns the movie's filename. A movie is not
|
||||||
|
// guaranteed to have a filename, if not, then this
|
||||||
|
// function returns a null filename.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE const Filename &MovieAudio::
|
||||||
|
get_filename() const {
|
||||||
|
return _filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#include "namable.h"
|
#include "namable.h"
|
||||||
#include "pointerTo.h"
|
#include "pointerTo.h"
|
||||||
#include "typedWritableReferenceCount.h"
|
#include "typedWritableReferenceCount.h"
|
||||||
class MovieAudio;
|
class MovieAudioCursor;
|
||||||
#include "movieAudioCursor.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : MovieAudio
|
// Class : MovieAudio
|
||||||
@ -40,13 +39,17 @@ class MovieAudio;
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDA_MOVIES MovieAudio : public TypedWritableReferenceCount, public Namable {
|
class EXPCL_PANDA_MOVIES MovieAudio : public TypedWritableReferenceCount, public Namable {
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
MovieAudio(const string &name = "Blank Audio");
|
MovieAudio(const string &name = "Blank Audio");
|
||||||
virtual ~MovieAudio();
|
virtual ~MovieAudio();
|
||||||
virtual PT(MovieAudioCursor) open();
|
virtual PT(MovieAudioCursor) open();
|
||||||
static PT(MovieAudio) get(const Filename &name);
|
static PT(MovieAudio) get(const Filename &name);
|
||||||
|
INLINE const Filename &get_filename() const;
|
||||||
public:
|
|
||||||
|
protected:
|
||||||
|
Filename _filename;
|
||||||
|
|
||||||
|
public:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
return _type_handle;
|
return _type_handle;
|
||||||
}
|
}
|
||||||
@ -60,10 +63,11 @@ public:
|
|||||||
}
|
}
|
||||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TypeHandle _type_handle;
|
static TypeHandle _type_handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "movieAudio.I"
|
#include "movieAudio.I"
|
||||||
|
#include "movieAudioCursor.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,7 +29,7 @@ TypeHandle MovieAudioCursor::_type_handle;
|
|||||||
// a subclass of this class.
|
// a subclass of this class.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
MovieAudioCursor::
|
MovieAudioCursor::
|
||||||
MovieAudioCursor(PT(MovieAudio) src) :
|
MovieAudioCursor(MovieAudio *src) :
|
||||||
_source(src),
|
_source(src),
|
||||||
_audio_rate(8000),
|
_audio_rate(8000),
|
||||||
_audio_channels(1),
|
_audio_channels(1),
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#include "namable.h"
|
#include "namable.h"
|
||||||
#include "texture.h"
|
#include "texture.h"
|
||||||
#include "pointerTo.h"
|
#include "pointerTo.h"
|
||||||
class MovieAudioCursor;
|
class MovieAudio;
|
||||||
#include "movieAudio.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : MovieAudioCursor
|
// Class : MovieAudioCursor
|
||||||
@ -43,7 +42,7 @@ class MovieAudioCursor;
|
|||||||
class EXPCL_PANDA_MOVIES MovieAudioCursor : public TypedWritableReferenceCount {
|
class EXPCL_PANDA_MOVIES MovieAudioCursor : public TypedWritableReferenceCount {
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
MovieAudioCursor(PT(MovieAudio) src);
|
MovieAudioCursor(MovieAudio *src);
|
||||||
virtual ~MovieAudioCursor();
|
virtual ~MovieAudioCursor();
|
||||||
INLINE PT(MovieAudio) get_source() const;
|
INLINE PT(MovieAudio) get_source() const;
|
||||||
INLINE int audio_rate() const;
|
INLINE int audio_rate() const;
|
||||||
@ -89,5 +88,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#include "movieAudioCursor.I"
|
#include "movieAudioCursor.I"
|
||||||
|
#include "movieAudio.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -16,3 +16,14 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: MovieVideo::get_filename
|
||||||
|
// Access: Published
|
||||||
|
// Description: Returns the movie's filename. A movie is not
|
||||||
|
// guaranteed to have a filename, if not, then this
|
||||||
|
// function returns a null filename.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE const Filename &MovieVideo::
|
||||||
|
get_filename() const {
|
||||||
|
return _filename;
|
||||||
|
}
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#include "namable.h"
|
#include "namable.h"
|
||||||
#include "pointerTo.h"
|
#include "pointerTo.h"
|
||||||
#include "typedWritableReferenceCount.h"
|
#include "typedWritableReferenceCount.h"
|
||||||
class MovieVideo;
|
class MovieVideoCursor;
|
||||||
#include "movieVideoCursor.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : MovieVideo
|
// Class : MovieVideo
|
||||||
@ -45,8 +44,12 @@ class EXPCL_PANDA_MOVIES MovieVideo : public TypedWritableReferenceCount, public
|
|||||||
virtual ~MovieVideo();
|
virtual ~MovieVideo();
|
||||||
virtual PT(MovieVideoCursor) open();
|
virtual PT(MovieVideoCursor) open();
|
||||||
static PT(MovieVideo) get(const Filename &name);
|
static PT(MovieVideo) get(const Filename &name);
|
||||||
|
INLINE const Filename &get_filename() const;
|
||||||
|
|
||||||
public:
|
protected:
|
||||||
|
Filename _filename;
|
||||||
|
|
||||||
|
public:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
return _type_handle;
|
return _type_handle;
|
||||||
}
|
}
|
||||||
@ -60,10 +63,11 @@ public:
|
|||||||
}
|
}
|
||||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TypeHandle _type_handle;
|
static TypeHandle _type_handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "movieVideo.I"
|
#include "movieVideo.I"
|
||||||
|
#include "movieVideoCursor.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@ TypeHandle MovieVideoCursor::_type_handle;
|
|||||||
// to construct a subclass of this class.
|
// to construct a subclass of this class.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
MovieVideoCursor::
|
MovieVideoCursor::
|
||||||
MovieVideoCursor(PT(MovieVideo) src) :
|
MovieVideoCursor(MovieVideo *src) :
|
||||||
_source(src),
|
_source(src),
|
||||||
_size_x(1),
|
_size_x(1),
|
||||||
_size_y(1),
|
_size_y(1),
|
||||||
@ -40,7 +40,8 @@ MovieVideoCursor(PT(MovieVideo) src) :
|
|||||||
_can_seek_fast(true),
|
_can_seek_fast(true),
|
||||||
_aborted(false),
|
_aborted(false),
|
||||||
_last_start(-1.0),
|
_last_start(-1.0),
|
||||||
_next_start(0.0)
|
_next_start(0.0),
|
||||||
|
_conversion_buffer(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
#include "pandabase.h"
|
#include "pandabase.h"
|
||||||
#include "texture.h"
|
#include "texture.h"
|
||||||
#include "pointerTo.h"
|
#include "pointerTo.h"
|
||||||
class MovieVideoCursor;
|
class MovieVideo;
|
||||||
#include "movieVideo.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : MovieVideoCursor
|
// Class : MovieVideoCursor
|
||||||
@ -42,7 +41,7 @@ class MovieVideoCursor;
|
|||||||
class EXPCL_PANDA_MOVIES MovieVideoCursor : public TypedWritableReferenceCount {
|
class EXPCL_PANDA_MOVIES MovieVideoCursor : public TypedWritableReferenceCount {
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
MovieVideoCursor(PT(MovieVideo) src);
|
MovieVideoCursor(MovieVideo *src);
|
||||||
virtual ~MovieVideoCursor();
|
virtual ~MovieVideoCursor();
|
||||||
PT(MovieVideo) get_source() const;
|
PT(MovieVideo) get_source() const;
|
||||||
INLINE int size_x() const;
|
INLINE int size_x() const;
|
||||||
@ -97,5 +96,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#include "movieVideoCursor.I"
|
#include "movieVideoCursor.I"
|
||||||
|
#include "movieVideo.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user