summaryrefslogtreecommitdiff
path: root/drivers/theoraplayer
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/theoraplayer')
-rw-r--r--drivers/theoraplayer/SCsub10
-rw-r--r--drivers/theoraplayer/src/TheoraVideoClip.cpp1
-rw-r--r--drivers/theoraplayer/video_stream_theoraplayer.cpp6
3 files changed, 12 insertions, 5 deletions
diff --git a/drivers/theoraplayer/SCsub b/drivers/theoraplayer/SCsub
index cd8cabcc94..09fb13d8e9 100644
--- a/drivers/theoraplayer/SCsub
+++ b/drivers/theoraplayer/SCsub
@@ -61,13 +61,17 @@ src/YUV/C/yuv420_rgb_c.c
src/TheoraVideoFrame.cpp
""")
+env_theora = env.Clone()
+
if env["platform"] == "iphone":
sources.append("src/AVFoundation/TheoraVideoClip_AVFoundation.mm")
env.Append(LINKFLAGS=['-framework', 'CoreVideo', '-framework', 'CoreMedia', '-framework', 'AVFoundation'])
+ if env["target"] == "release":
+ env_theora.Append(CPPFLAGS=["-D_IOS", "-D__ARM_NEON__", "-fstrict-aliasing", "-fmessage-length=210", "-fdiagnostics-show-note-include-stack", "-fmacro-backtrace-limit=0", "-fcolor-diagnostics", "-Wno-trigraphs", "-fpascal-strings", "-fvisibility=hidden", "-fvisibility-inlines-hidden"])
-env_theora = env.Clone()
-
-env_theora.Append(CPPFLAGS=["-D_YUV_C", "-D_LIB", "-D__THEORA"])
+env_theora.Append(CPPFLAGS=["-D_LIB", "-D__THEORA"]) # removed -D_YUV_C
+env_theora.Append(CPPFLAGS=["-D_YUV_LIBYUV"])
+#env_theora.Append(CPPFLAGS=["-D_YUV_C"])
if env["platform"] == "iphone":
env_theora.Append(CPPFLAGS=["-D__AVFOUNDATION"])
diff --git a/drivers/theoraplayer/src/TheoraVideoClip.cpp b/drivers/theoraplayer/src/TheoraVideoClip.cpp
index ed9f2c22da..16897ee80e 100644
--- a/drivers/theoraplayer/src/TheoraVideoClip.cpp
+++ b/drivers/theoraplayer/src/TheoraVideoClip.cpp
@@ -249,6 +249,7 @@ int TheoraVideoClip::discardOutdatedFrames(float absTime)
if (nPop > 0)
{
+#define _DEBUG
#ifdef _DEBUG
std::string log = getName() + ": dropped frame ";
diff --git a/drivers/theoraplayer/video_stream_theoraplayer.cpp b/drivers/theoraplayer/video_stream_theoraplayer.cpp
index 62dee1336a..9f4a44ae9d 100644
--- a/drivers/theoraplayer/video_stream_theoraplayer.cpp
+++ b/drivers/theoraplayer/video_stream_theoraplayer.cpp
@@ -215,7 +215,7 @@ public:
channels = p_channels;
freq = p_freq;
total_wrote = 0;
- rb_power = 12;
+ rb_power = 22;
rb.resize(rb_power);
};
@@ -258,10 +258,12 @@ public:
void update(float time_increase)
{
+ float prev_time = mTime;
//mTime = (float)(stream->get_total_wrote()) / freq;
//mTime = MAX(0,mTime-AudioServer::get_singleton()->get_output_delay());
//mTime = (float)sample_count / channels / freq;
mTime += time_increase;
+ if (mTime - prev_time > .02) printf("time increase %f secs\n", mTime - prev_time);
//float duration=mClip->getDuration();
//if (mTime > duration) mTime=duration;
//printf("time at timer is %f, %f, samples %i\n", mTime, time_increase, sample_count);
@@ -386,7 +388,7 @@ void VideoStreamTheoraplayer::pop_frame(Ref<ImageTexture> p_tex) {
{
DVector<uint8_t>::Write wr = data.write();
uint8_t* ptr = wr.ptr();
- copymem(ptr, f->getBuffer(), imgsize);
+ memcpy(ptr, f->getBuffer(), imgsize);
}
/*
for (int i=0; i<h; i++) {