vrplayer: work on removing server side timing
This commit is contained in:
@@ -13,6 +13,7 @@ Decoder::Decoder(QObject *parent) :
|
||||
*****************************************************************************/
|
||||
int Decoder::init(QString filename)
|
||||
{
|
||||
printf("Decoder::init\n");
|
||||
if (channel)
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
|
||||
|
||||
// not used
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "decoderthread.h"
|
||||
|
||||
/*
|
||||
@@ -155,7 +175,6 @@ void DecoderThread::audioTimerCallback()
|
||||
return;
|
||||
}
|
||||
|
||||
printf("audio2\n");
|
||||
pkt = audioQueue.dequeue();
|
||||
delayInMs = (int) ((float) pkt->delay_in_us / 1000.0);
|
||||
send_audio_pkt(channel, 101, pkt->av_pkt);
|
||||
@@ -179,7 +198,7 @@ void DecoderThread::videoTimerCallback()
|
||||
}
|
||||
|
||||
pkt = videoQueue.dequeue();
|
||||
delayInMs = (int) ((float) pkt->delay_in_us / 1000.0);
|
||||
delayInMs = (int) 10; // ((float) pkt->delay_in_us / 1000.0);
|
||||
send_video_pkt(channel, 101, pkt->av_pkt);
|
||||
delete pkt;
|
||||
updateSlider();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#include "ourinterface.h"
|
||||
|
||||
OurInterface::OurInterface(QObject *parent) :
|
||||
@@ -84,6 +85,7 @@ int OurInterface::openVirtualChannel()
|
||||
if (channel)
|
||||
return -1;
|
||||
|
||||
printf("OurInterface::openVirtualChannel:\n");
|
||||
/* open a virtual channel and connect to remote client */
|
||||
channel = WTSVirtualChannelOpenEx(WTS_CURRENT_SESSION, "xrdpvr", 0);
|
||||
if (channel == NULL)
|
||||
@@ -116,13 +118,20 @@ int OurInterface::closeVirtualChannel()
|
||||
******************************************************************************/
|
||||
int OurInterface::sendMetadataFile()
|
||||
{
|
||||
|
||||
if (xrdpvr_init_player(channel, 101, filename.toAscii().data()))
|
||||
{
|
||||
fprintf(stderr, "failed to initialize the player\n");
|
||||
return -1;
|
||||
}
|
||||
#if 0
|
||||
if (xrdpvr_create_metadata_file(channel, filename.toAscii().data()))
|
||||
{
|
||||
emit on_ErrorMsg("I/O Error",
|
||||
"An error occurred while sending data to remote client");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,15 +80,18 @@ void PlayVideo::play()
|
||||
|
||||
label1:
|
||||
|
||||
printf("video\n");
|
||||
if (videoQueue->isEmpty())
|
||||
{
|
||||
printf("---empty\n");
|
||||
usleep(1000);
|
||||
continue;
|
||||
}
|
||||
pkt = videoQueue->dequeue();
|
||||
sendMutex->lock();
|
||||
send_video_pkt(channel, stream_id, pkt->av_pkt);
|
||||
sendMutex->unlock();
|
||||
usl = pkt->delay_in_us;
|
||||
usl = 1000; // pkt->delay_in_us;
|
||||
if (usl < 0)
|
||||
{
|
||||
usl = 0;
|
||||
|
||||
Reference in New Issue
Block a user