- Open/Save file
- Add CITP/MSEx menu
- Make Thumbs
- Init CITP/MSEx
This commit is contained in:
Santi Noreña 2013-02-11 17:52:36 +01:00
parent 62947ac256
commit ef52ae20d8
10 changed files with 278 additions and 265 deletions

View file

@ -1,9 +1,10 @@
/* --------------------------------------------------------------------------*/ /* --------------------------------------------------------------------------*/
/* */ /* */
/* object for getting file listings using wildcard patterns */ /* object for getting files */
/* Written by Hans-Christoph Steiner <hans@eds.org> */ /* */
/* Based on folderlist by Hans-Christoph Steiner <hans@eds.org> */
/* */ /* */
/* Copyright (c) 2006 Hans-Christoph Steiner */ /* Copyright (c) 2013 Santi Noreña <belfegor@gmail.com> */
/* */ /* */
/* This program is free software; you can redistribute it and/or */ /* This program is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU General Public License */ /* modify it under the terms of the GNU General Public License */
@ -24,22 +25,15 @@
/* --------------------------------------------------------------------------*/ /* --------------------------------------------------------------------------*/
#include <m_pd.h> #include <m_pd.h>
#ifdef _WIN32
#define _WIN32_WINNT 0x0400
#include <windows.h>
#else
#include <stdlib.h> #include <stdlib.h>
#include <glob.h> #include <glob.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
//static char *version = "$Revision: 0.01 $"; //static char *version = "$Revision: 0.01 $";
#define DEBUG(x) #define DEBUG(x)
//#define DEBUG(x) x
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* CLASS DEF * CLASS DEF

View file

@ -1,4 +1,4 @@
#N canvas 547 370 611 318 10; #N canvas 543 390 611 318 10;
#N canvas 315 169 952 599 dmx 0; #N canvas 315 169 952 599 dmx 0;
#X obj -7 437 list split; #X obj -7 437 list split;
#X obj 99 444 list split; #X obj 99 444 list split;
@ -136,95 +136,89 @@
#X connect 5 0 7 0; #X connect 5 0 7 0;
#X connect 7 0 4 3; #X connect 7 0 4 3;
#X restore -309 -438 pd fondo; #X restore -309 -438 pd fondo;
#N canvas 0 84 1440 792 receive 0; #N canvas 73 329 1092 358 receive 0;
#X obj 71 -398 select 1;
#X obj 123 -358 select 2 3 4 5;
#X obj 22 -242 s winposx; #X obj 22 -242 s winposx;
#X obj 101 -240 s winposy; #X obj 90 -242 s winposy;
#X obj 170 -238 s winsizex; #X obj 158 -242 s winsizex;
#X obj 249 -238 s winsizey; #X obj 233 -242 s winsizey;
#X obj 22 -266 float; #X obj 22 -266 float;
#X obj 101 -268 float; #X obj 90 -266 float;
#X obj 170 -274 float; #X obj 158 -266 float;
#X obj 250 -270 float; #X obj 233 -266 float;
#X obj 342 -231 s layer1; #X obj 323 -241 s layer1;
#X obj 677 -389 select 11 12 13 14 15 16 17 18; #X obj 382 -241 s layer2;
#X obj 400 -228 s layer2; #X obj 442 -241 s layer3;
#X obj 460 -226 s layer3; #X obj 503 -241 s layer4;
#X obj 540 -223 s layer4; #X obj 563 -241 s layer5;
#X obj 599 -223 s layer5; #X obj 624 -241 s layer6;
#X obj 663 -221 s layer6; #X obj 685 -241 s layer7;
#X obj 725 -224 s layer7; #X obj 746 -241 s layer8;
#X obj 791 -226 s layer8; #X obj 323 -265 float;
#X obj 342 -266 float; #X obj 382 -265 float;
#X obj 396 -267 float; #X obj 442 -265 float;
#X obj 451 -266 float; #X obj 503 -265 float;
#X obj 540 -266 float; #X obj 746 -265 float;
#X obj 789 -263 float; #X obj 563 -265 float;
#X obj 592 -265 float; #X obj 624 -265 float;
#X obj 659 -269 float; #X obj 685 -265 float;
#X obj 721 -263 float; #X obj 847 -264 float;
#X obj 861 -252 float; #X obj 847 -239 s ola;
#X obj 861 -227 s ola; #X obj 898 -263 float;
#X obj 911 -252 float; #X obj 898 -239 s universe;
#X obj 911 -226 s universe; #X obj 615 -432 s path;
#X obj 615 -431 s path; #X obj -39 -265 float;
#X obj -1 -351 float;
#X obj 452 -449 unpack f f s; #X obj 452 -449 unpack f f s;
#X obj 452 -477 netreceive 9195; #X obj 452 -477 netreceive 9195;
#X obj 872 -324 select 20 21; #X obj -39 -242 s window;
#X obj 0 -316 s window; #X obj -39 -408 select 1 2 3 4 5 11 12 13 14 15 16 17 18 20 21;
#X connect 0 0 32 0; #X connect 4 0 0 0;
#X connect 0 1 1 0; #X connect 5 0 1 0;
#X connect 1 0 6 0;
#X connect 1 1 7 0;
#X connect 1 2 8 0;
#X connect 1 3 9 0;
#X connect 1 4 11 0;
#X connect 6 0 2 0; #X connect 6 0 2 0;
#X connect 7 0 3 0; #X connect 7 0 3 0;
#X connect 8 0 4 0; #X connect 16 0 8 0;
#X connect 9 0 5 0; #X connect 17 0 9 0;
#X connect 11 0 19 0; #X connect 18 0 10 0;
#X connect 11 1 20 0; #X connect 19 0 11 0;
#X connect 11 2 21 0; #X connect 20 0 15 0;
#X connect 11 3 22 0; #X connect 21 0 12 0;
#X connect 11 4 24 0; #X connect 22 0 13 0;
#X connect 11 5 25 0; #X connect 23 0 14 0;
#X connect 11 6 26 0; #X connect 24 0 25 0;
#X connect 11 7 23 0; #X connect 26 0 27 0;
#X connect 11 8 35 0; #X connect 29 0 32 0;
#X connect 19 0 10 0; #X connect 30 0 33 0;
#X connect 20 0 12 0; #X connect 30 1 4 1;
#X connect 21 0 13 0; #X connect 30 1 5 1;
#X connect 22 0 14 0; #X connect 30 1 6 1;
#X connect 23 0 18 0; #X connect 30 1 7 1;
#X connect 24 0 15 0; #X connect 30 1 16 1;
#X connect 25 0 16 0; #X connect 30 1 17 1;
#X connect 26 0 17 0; #X connect 30 1 18 1;
#X connect 27 0 28 0; #X connect 30 1 19 1;
#X connect 29 0 30 0; #X connect 30 1 21 1;
#X connect 32 0 36 0; #X connect 30 1 22 1;
#X connect 33 0 0 0; #X connect 30 1 23 1;
#X connect 33 1 6 1; #X connect 30 1 20 1;
#X connect 33 1 7 1; #X connect 30 1 24 1;
#X connect 33 1 8 1; #X connect 30 1 26 1;
#X connect 33 1 9 1; #X connect 30 1 29 1;
#X connect 33 1 19 1; #X connect 30 2 28 0;
#X connect 33 1 20 1; #X connect 31 0 30 0;
#X connect 33 1 21 1; #X connect 33 0 29 0;
#X connect 33 1 22 1; #X connect 33 1 4 0;
#X connect 33 1 24 1; #X connect 33 2 5 0;
#X connect 33 1 25 1; #X connect 33 3 6 0;
#X connect 33 1 26 1; #X connect 33 4 7 0;
#X connect 33 1 23 1; #X connect 33 5 16 0;
#X connect 33 1 27 1; #X connect 33 6 17 0;
#X connect 33 1 29 1; #X connect 33 7 18 0;
#X connect 33 1 32 1; #X connect 33 8 19 0;
#X connect 33 2 31 0; #X connect 33 9 21 0;
#X connect 34 0 33 0; #X connect 33 10 22 0;
#X connect 35 0 27 0; #X connect 33 11 23 0;
#X connect 35 1 29 0; #X connect 33 12 20 0;
#X connect 33 13 24 0;
#X connect 33 14 26 0;
#X restore -249 -438 pd receive; #X restore -249 -438 pd receive;
#N canvas 687 175 450 564 window 0; #N canvas 687 175 450 564 window 0;
#X msg 987 -347 color 0 0 0; #X msg 987 -347 color 0 0 0;

Binary file not shown.

View file

@ -18,7 +18,7 @@ if [ "$output" -eq "0" ]; then
echo "deb http://apt.openlighting.org/debian/ precise main" >> /etc/apt/sources.list echo "deb http://apt.openlighting.org/debian/ precise main" >> /etc/apt/sources.list
fi fi
apt-get update apt-get update
apt-get -y --force-yes install ola puredata tcl tk libqtcore4 libqtgui4 libmacgick++4 libav-tools apt-get -y --force-yes install ola libqtcore4 libqtgui4 libmacgick++4 libav-tools
if [ "$?" -eq "0" ]; then if [ "$?" -eq "0" ]; then
echo "apt-get finish ok" echo "apt-get finish ok"
else "apt-get return errors!" else "apt-get return errors!"

View file

@ -12,7 +12,7 @@
dpkg -i ola_0.8.26-1_i386.deb dpkg -i ola_0.8.26-1_i386.deb
# Install Pure Data y OLA # Install Pure Data y OLA
# libav para generar thumbs # libav para generar thumbs
apt-get -y --force-yes install puredata tcl tk libav-tools libqtcore4 libqtgui4 libmagick++5 apt-get -y --force-yes install tcl tk libav-tools libqtcore4 libqtgui4 libmagick++5
if [ "$?" -eq "0" ]; then if [ "$?" -eq "0" ]; then
echo "apt-get finish ok" echo "apt-get finish ok"
else "apt-get return errors!" else "apt-get return errors!"

View file

@ -1,37 +1,20 @@
#!/bin/bash #!/bin/bash
# make_thumbs v0.0.1 # make_thumbs v0.0.2
# Script que genera thumbnails de todas las películas en el directorio Media # Script que genera thumbnails de todas las películas en el directorio Media
# Copyright Santi Noreña 2012 # Copyright Santi Noreña 2012-2013
# puremediaserver at gmail dot com
# GPL License # GPL License
cd $0 ||{
# Edit next line to path to your media echo "Can not change to directory." $0
export MEDIA_DIR=/home/santi/PMS/svn/media/video
export E_XCD=86
cd $MEDIA_DIR ||{
echo "Can not change to directory." $MEDIA_DIR
exit $E_XCD; exit $E_XCD;
} }
for folder in $(find -maxdepth 1 -type d); do for folder in $(find -maxdepth 1 -type d); do
rm $folder/thumbs/* rm $folder/thumbs/*
mkdir $folder/thumbs mkdir $folder/thumbs
done done
for file in $(find . -maxdepth 2 -mindepth 2 -type f ); do for file in $(find . -maxdepth 2 -mindepth 2 -type f ); do
avconv -i $file -f image2 -frames:v 1 -s 64x46 -vcodec mjpeg $file.jpg avconv -i $file -f image2 -frames:v 1 -s 64x46 -vcodec mjpeg $file.jpg
done done
for folder in $(find -maxdepth 1 -type d); do for folder in $(find -maxdepth 1 -type d); do
mv $folder/*.jpg $folder/thumbs mv $folder/*.jpg $folder/thumbs
done done
# Crear una galería de mini imágenes
#for i in `ls *.jpg`;
#do
# convert -geometry 320x240 $i galleria-$i
#done
exit 0 exit 0

View file

@ -37,7 +37,10 @@
#define PDPORTW_AUDIO 9197 #define PDPORTW_AUDIO 9197
#define PDPORTR_AUDIO 9198 #define PDPORTR_AUDIO 9198
#define SOCKET "/tmp/pmspipe" #define SOCKET "/tmp/pmspipe" // Pipe wicho PD sends the files for preview in the GUI
#define CONF_FILE "lms.conf" // File when save/restore the configuration on exit/open
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
// Struct for the configuration files // Struct for the configuration files
@ -95,9 +98,6 @@ bool layer8Check_audio;
bool dmx_audio; bool dmx_audio;
quint8 universe_audio; quint8 universe_audio;
bool audioCheck; bool audioCheck;
// Path to Media Files
QString path;
}; };
// Constructor // Constructor
@ -137,10 +137,13 @@ libreMediaServer::libreMediaServer(QWidget *parent)
m_ola = new QProcess(this); m_ola = new QProcess(this);
olastart(); olastart();
// Conectamos los menus // Conectamos los menus
connect(ui.actionOpen_conf, SIGNAL(triggered()), this, SLOT(open())); connect(ui.actionOpen_conf, SIGNAL(triggered()), this, SLOT(openFile()));
connect(ui.actionSave_conf, SIGNAL(triggered()), this, SLOT(save())); connect(ui.actionSave_conf, SIGNAL(triggered()), this, SLOT(saveFile()));
connect(ui.actionChange_Media_Path, SIGNAL(triggered()), this, SLOT(ChangeMediaPath()));
connect(ui.actionInitMSEX, SIGNAL(triggered()), this, SLOT(InitMSEX()));
// Load the configuration // Load the configuration
open(); open_start();
// Connect MSEx
connect(m_msex,SIGNAL(frameRequest()), this, SLOT(sendFrame())); connect(m_msex,SIGNAL(frameRequest()), this, SLOT(sendFrame()));
} }
@ -149,7 +152,7 @@ libreMediaServer::libreMediaServer(QWidget *parent)
libreMediaServer::~libreMediaServer() libreMediaServer::~libreMediaServer()
{ {
save(); save_finish();
QFile socket(SOCKET); QFile socket(SOCKET);
socket.remove(); socket.remove();
if (m_pd_write_video != NULL) { if (m_pd_write_video != NULL) {
@ -184,28 +187,100 @@ libreMediaServer::~libreMediaServer()
if (m_pd_write_audio != NULL) if (m_pd_write_audio != NULL)
{ {
m_pd_read_audio->close(); m_pd_read_audio->close();
} }
return; return;
} }
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
// File Configuration Stuff // open/save the last configuration known
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
// Load the last configuration from the file pms.conf // Load the last configuration from the configuration file
void libreMediaServer::open_start()
void libreMediaServer::open()
{ {
QFile file("lms.conf"); QFile file(CONF_FILE);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) open(&file);
{ }
qDebug()<<("Can not find the conf file");
// Save the last configuration to the conf file
void libreMediaServer::save_finish()
{
QFile file(CONF_FILE);
save(&file);
}
///////////////////////////////////////////////////////////////////
// Menu File
///////////////////////////////////////////////////////////////////
// Open a configuration File
void libreMediaServer::openFile()
{
QFileDialog dialog(this);
if (!dialog.exec())
return; return;
} QStringList fileNames;
unsigned char * fileconf = new unsigned char[file.size()]; fileNames = dialog.selectedFiles();
memset(fileconf, 0, file.size()); QFile file(fileNames.at(0));
fileconf = file.map(0x00, file.size()); open(&file);
}
// Save configuration File
void libreMediaServer::saveFile()
{
QFileDialog dialog(this);
if (!dialog.exec())
return;
QStringList fileNames;
fileNames = dialog.selectedFiles();
QFile file(fileNames.at(0));
save(&file);
}
// Change Media path
void libreMediaServer::ChangeMediaPath()
{
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::Directory);
QStringList fileNames;
if (!dialog.exec())
return;
fileNames = dialog.selectedFiles();
QString file = fileNames.at(0);
m_pathmedia = file;
QString desc = tr("0000 0000 %1;").arg(file);
if (ui.video->checkState())
{
if (!sendPacket(desc.toAscii().constData(),desc.size()))
{
errorsending();
}
}
if (ui.audio->checkState())
{
if (!sendPacket_audio(desc.toAscii().constData(),desc.size()))
{
errorsending_audio();
}
}
desc = tr("Media Path Changed to: %1").arg(m_pathmedia);
ui.textEdit->appendPlainText(desc.toAscii());
}
///////////////////////////////////////////////////////////////////
// Open/save Subroutines. The real work.
///////////////////////////////////////////////////////////////////
void libreMediaServer::open(QFile *file)
{
if (!file->open(QIODevice::ReadOnly | QIODevice::Text))
{
qDebug()<<("Can not find the configuration file");
return;
}
int size = file->size();
unsigned char * fileconf = new unsigned char[size];
memset(fileconf, 0, size);
fileconf = file->map(0x00, size);
if (fileconf == 0){ if (fileconf == 0){
qDebug()<<("Cannot map the file"); qDebug()<<("Cannot map the file");
return; return;
@ -240,7 +315,6 @@ void libreMediaServer::open()
ui.ipAddress3->setValue(packet->ipadd3); ui.ipAddress3->setValue(packet->ipadd3);
ui.ipAddress4->setValue(packet->ipadd4); ui.ipAddress4->setValue(packet->ipadd4);
ui.video->setChecked(packet->videoCheck); ui.video->setChecked(packet->videoCheck);
// Audio Configuration // Audio Configuration
ui.layer1Add_audio->setValue(packet->layer1Add_audio); ui.layer1Add_audio->setValue(packet->layer1Add_audio);
ui.layer1Check_audio->setChecked(packet->layer1Check_audio); ui.layer1Check_audio->setChecked(packet->layer1Check_audio);
@ -261,29 +335,32 @@ void libreMediaServer::open()
ui.readDMX_audio->setChecked(packet->dmx_audio); ui.readDMX_audio->setChecked(packet->dmx_audio);
ui.universe_audio->setValue(packet->universe_audio); ui.universe_audio->setValue(packet->universe_audio);
ui.audio->setChecked(packet->audioCheck); ui.audio->setChecked(packet->audioCheck);
// Path to media
// Path to media int offset = sizeof(struct conf);
int offset = sizeof(struct conf) - 4; size = size - offset;
int size = file.size() - offset;
char * buffer = new char[size]; char * buffer = new char[size];
memset(buffer, 0, size); memset(buffer, 0, size);
memcpy(buffer, fileconf+offset, size); memcpy(buffer, fileconf+offset, size);
m_pathmedia = buffer; m_pathmedia = buffer;
QString desc = tr("Media Path Changed to: %1").arg(m_pathmedia); QString desc = tr("Media Path Changed to: %1").arg(m_pathmedia);
qDebug()<<(desc); qDebug()<<(desc);
file.close(); file->close();
delete buffer;
// delete fileconf; // Comment due to Seg Fault
} }
// Save the configuration to pms.conf file void libreMediaServer::save(QFile *file)
void libreMediaServer::save()
{ {
if (!file->open(QIODevice::WriteOnly | QIODevice::Text))
{
qDebug()<<("Can not open file pms.conf");
return;
}
int bufferLen = sizeof(struct conf) + m_pathmedia.size(); int bufferLen = sizeof(struct conf) + m_pathmedia.size();
unsigned char *buffer = new unsigned char[bufferLen]; unsigned char *buffer = new unsigned char[bufferLen];
memset(buffer, 0, bufferLen); memset(buffer, 0, bufferLen);
conf *packet = (conf *)buffer; conf *packet = (conf *)buffer;
// Video Configuration // Video Configuration
packet->window = ui.window->checkState(); packet->window = ui.window->checkState();
packet->winpositionx = ui.winpositionx->value(); packet->winpositionx = ui.winpositionx->value();
packet->winpositiony = ui.winpositiony->value(); packet->winpositiony = ui.winpositiony->value();
@ -312,9 +389,7 @@ void libreMediaServer::save()
packet->ipadd3 = ui.ipAddress3->value(); packet->ipadd3 = ui.ipAddress3->value();
packet->ipadd4 = ui.ipAddress4->value(); packet->ipadd4 = ui.ipAddress4->value();
packet->videoCheck = ui.video->checkState(); packet->videoCheck = ui.video->checkState();
// Audio Configuration // Audio Configuration
packet->layer1Add_audio = ui.layer1Add_audio->value(); packet->layer1Add_audio = ui.layer1Add_audio->value();
packet->layer1Check_audio = ui.layer1Check_audio->checkState(); packet->layer1Check_audio = ui.layer1Check_audio->checkState();
packet->layer2Add_audio = ui.layer2Add_audio->value(); packet->layer2Add_audio = ui.layer2Add_audio->value();
@ -334,21 +409,13 @@ void libreMediaServer::save()
packet->dmx_audio = ui.readDMX_audio->checkState(); packet->dmx_audio = ui.readDMX_audio->checkState();
packet->universe_audio = ui.universe_audio->value(); packet->universe_audio = ui.universe_audio->value();
packet->audioCheck = ui.audio->checkState(); packet->audioCheck = ui.audio->checkState();
// Path to media // Path to media
int offset = sizeof (struct conf);
int offset = sizeof (struct conf) - 4;
memcpy(buffer+offset, m_pathmedia.toAscii().constData(), m_pathmedia.size()); memcpy(buffer+offset, m_pathmedia.toAscii().constData(), m_pathmedia.size());
QFile file("lms.conf"); int error = file->write((const char *)buffer, bufferLen);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
{
qDebug()<<("Can not open file pms.conf");
return;
}
int error = file.write((const char *)buffer, bufferLen);
QString errorstring = tr("Bytes Write to file %1").arg(error); QString errorstring = tr("Bytes Write to file %1").arg(error);
qDebug()<<"Saved file complete:"<<(errorstring); qDebug()<<"Saved file complete:"<<(errorstring);
file.close(); file->close();
delete buffer; delete buffer;
} }
@ -367,51 +434,14 @@ void libreMediaServer::olastart()
* User Interface Stuff * User Interface Stuff
*/ */
///////////////////////////////////////////////////////////////////
// Global Controls
///////////////////////////////////////////////////////////////////
// Change Media path
void libreMediaServer::on_ChangePath_clicked()
{
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::Directory);
QStringList fileNames;
if (!dialog.exec())
return;
fileNames = dialog.selectedFiles();
QString file = fileNames.at(0);
m_pathmedia = file;
QString desc = tr("0000 0000 %1;").arg(file);
if (ui.video->checkState())
{
if (!sendPacket(desc.toAscii().constData(),desc.size()))
{
errorsending();
}
}
if (ui.audio->checkState())
{
if (!sendPacket_audio(desc.toAscii().constData(),desc.size()))
{
errorsending_audio();
}
}
desc = tr("Media Path Changed to: %1").arg(m_pathmedia);
ui.textEdit->appendPlainText(desc.toAscii());
}
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
// Video Controls // Menu CITP/MSEx
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
// Init the CITP/MSEx protocol. // Init the CITP/MSEx protocol.
// Begins the CITP/MSEx protocol void libreMediaServer::initMSEX()
// ToDo: Include thumbs generation here
void libreMediaServer::on_updateButton_clicked()
{ {
// Chequeamos si existe el path a los medias // Chequeamos si existe el path a los medias
QDir dir(m_pathmedia); QDir dir(m_pathmedia);
@ -441,9 +471,21 @@ void libreMediaServer::on_updateButton_clicked()
ipadd = ipadd + i; ipadd = ipadd + i;
m_msex->startCitp(ipadd); m_msex->startCitp(ipadd);
} }
//void setIPAdd();
// Generates the thumbs to transmit by CITP/MSEx
void libreMediaServer::makeThumbs()
{
QProcess *script = new QProcess ();
QStringList arguments;
arguments << m_pathmedia;
script->execute("./scripts/make_thumbs.sh", arguments);
}
///////////////////////////////////////////////////////////////////
// Video Controls
///////////////////////////////////////////////////////////////////
// Window Configuration // Window Configuration
void libreMediaServer::on_window_stateChanged(int state) void libreMediaServer::on_window_stateChanged(int state)
{ {
if ((state == 2)) { if ((state == 2)) {
@ -897,7 +939,7 @@ void libreMediaServer::pdrestart()
{ {
return; return;
} }
save(); save_finish();
qDebug()<<"Restarting PD"; qDebug()<<"Restarting PD";
ui.textEdit->appendPlainText("PD Restarting..."); ui.textEdit->appendPlainText("PD Restarting...");
disconnect(m_pd_video, SIGNAL(finished(int)), this, SLOT(pdrestart())); disconnect(m_pd_video, SIGNAL(finished(int)), this, SLOT(pdrestart()));
@ -926,7 +968,7 @@ void libreMediaServer::newmessage()
QByteArray byteArray; QByteArray byteArray;
byteArray.resize(m_read_vid->bytesAvailable()); byteArray.resize(m_read_vid->bytesAvailable());
byteArray = m_read_vid->readAll(); byteArray = m_read_vid->readAll();
if (byteArray == NULL) if (byteArray.isEmpty())
{ {
return; return;
} }
@ -1424,7 +1466,7 @@ void libreMediaServer::stdout_audio() {
void libreMediaServer::pdrestart_audio() void libreMediaServer::pdrestart_audio()
{ {
save(); save_finish();
qDebug()<<"Restarting PD audio"; qDebug()<<"Restarting PD audio";
ui.textEdit->appendPlainText("PD audio Restarting..."); ui.textEdit->appendPlainText("PD audio Restarting...");
int state = m_pd_audio->state(); int state = m_pd_audio->state();
@ -1593,7 +1635,7 @@ void libreMediaServer::sendFrame()
qDebug()<<"sendFrame: Can not convert screen capture to image"; qDebug()<<"sendFrame: Can not convert screen capture to image";
return; return;
} }
image = image.scaledToWidth(88);http://palmadores.net/index.php image = image.scaledToWidth(88);
image = image.convertToFormat(QImage::Format_RGB888); image = image.convertToFormat(QImage::Format_RGB888);
int bufferLen = image.byteCount(); int bufferLen = image.byteCount();
int bufferLenTot = sizeof(struct CITP_MSEX_10_StFr ) + bufferLen; int bufferLenTot = sizeof(struct CITP_MSEX_10_StFr ) + bufferLen;

View file

@ -71,6 +71,10 @@ private:
bool sendPacket_audio(const char *buffer, int bufferLen); bool sendPacket_audio(const char *buffer, int bufferLen);
void pdstart_audio(); void pdstart_audio();
void errorsending_audio(); void errorsending_audio();
void open_start();
void save_finish();
void open(QFile *file);
void save(QFile *file);
public slots: public slots:
@ -79,11 +83,7 @@ public slots:
private slots: private slots:
void olastart(); // Init the OLA daemon void olastart(); // Init the OLA daemon
void on_ChangePath_clicked();// Change the path to medias // Video
// Video
void on_updateButton_clicked(); // Init the CITP/MSEx protocol
void newPeer(); void newPeer();
void newmessage(); void newmessage();
void newconexion(); void newconexion();
@ -112,9 +112,7 @@ private slots:
void pdrestart(); void pdrestart();
void stdout(); void stdout();
void on_video_stateChanged(int state); void on_video_stateChanged(int state);
//Audio //Audio
void newPeer_audio(); void newPeer_audio();
void newmessage_audio(); void newmessage_audio();
void newconexion_audio(); void newconexion_audio();
@ -138,16 +136,16 @@ private slots:
void pdrestart_audio(); void pdrestart_audio();
void stdout_audio(); void stdout_audio();
void on_audio_stateChanged(int state); void on_audio_stateChanged(int state);
// Preview
// File configuration void previewMaster();
// Menu File
void open(); void openFile();
void save(); void saveFile();
void ChangeMediaPath();// Change the path to medias
// Previews // Menu CITP/MSEx
void initMSEX(); // Init the CITP/MSEx protocol
void previewMaster(); // void setIPAdd();
void makeThumbs();
}; };
#endif // LIBREMEDIASERVER_H #endif // LIBREMEDIASERVER_H

View file

@ -7,8 +7,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>789</width> <width>773</width>
<height>615</height> <height>626</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -23,7 +23,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>120</y> <y>120</y>
<width>791</width> <width>831</width>
<height>441</height> <height>441</height>
</rect> </rect>
</property> </property>
@ -37,7 +37,7 @@
<enum>QTabWidget::Rounded</enum> <enum>QTabWidget::Rounded</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<property name="usesScrollButtons"> <property name="usesScrollButtons">
<bool>false</bool> <bool>false</bool>
@ -175,19 +175,6 @@
<number>512</number> <number>512</number>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="updateButton">
<property name="geometry">
<rect>
<x>490</x>
<y>190</y>
<width>113</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>Init CITP/MSEx</string>
</property>
</widget>
<widget class="QSpinBox" name="layer3Add"> <widget class="QSpinBox" name="layer3Add">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@ -645,22 +632,6 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="ChangePath">
<property name="geometry">
<rect>
<x>470</x>
<y>150</y>
<width>150</width>
<height>28</height>
</rect>
</property>
<property name="whatsThis">
<string>Change the path to your media tree </string>
</property>
<property name="text">
<string>Change Media Path</string>
</property>
</widget>
<widget class="QLabel" name="masterPreview"> <widget class="QLabel" name="masterPreview">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@ -693,7 +664,6 @@
<zorder>layer6Add</zorder> <zorder>layer6Add</zorder>
<zorder>window</zorder> <zorder>window</zorder>
<zorder>layer7Add</zorder> <zorder>layer7Add</zorder>
<zorder>updateButton</zorder>
<zorder>layer3Add</zorder> <zorder>layer3Add</zorder>
<zorder>layer8Check</zorder> <zorder>layer8Check</zorder>
<zorder>layer2Add</zorder> <zorder>layer2Add</zorder>
@ -721,7 +691,6 @@
<zorder>layer6Preview</zorder> <zorder>layer6Preview</zorder>
<zorder>layer7Preview</zorder> <zorder>layer7Preview</zorder>
<zorder>layer8Preview</zorder> <zorder>layer8Preview</zorder>
<zorder>ChangePath</zorder>
<zorder>masterPreview</zorder> <zorder>masterPreview</zorder>
</widget> </widget>
<widget class="QWidget" name="Audio"> <widget class="QWidget" name="Audio">
@ -1124,7 +1093,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>801</width> <width>751</width>
<height>121</height> <height>121</height>
</rect> </rect>
</property> </property>
@ -1141,8 +1110,8 @@ This program comes with ABSOLUTELY NO WARRANTY</string>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>789</width> <width>773</width>
<height>25</height> <height>29</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@ -1151,8 +1120,18 @@ This program comes with ABSOLUTELY NO WARRANTY</string>
</property> </property>
<addaction name="actionOpen_conf"/> <addaction name="actionOpen_conf"/>
<addaction name="actionSave_conf"/> <addaction name="actionSave_conf"/>
<addaction name="actionChange_Media_Path"/>
</widget>
<widget class="QMenu" name="menuCITP_MSEx">
<property name="title">
<string>CITP/MSEx</string>
</property>
<addaction name="actionInitMSEX"/>
<addaction name="actionIP_Address"/>
<addaction name="actionMake_Thumbs"/>
</widget> </widget>
<addaction name="menuFile"/> <addaction name="menuFile"/>
<addaction name="menuCITP_MSEx"/>
</widget> </widget>
<action name="actionExit"> <action name="actionExit">
<property name="text"> <property name="text">
@ -1161,12 +1140,35 @@ This program comes with ABSOLUTELY NO WARRANTY</string>
</action> </action>
<action name="actionOpen_conf"> <action name="actionOpen_conf">
<property name="text"> <property name="text">
<string>Open conf</string> <string>Open Configuration</string>
</property> </property>
</action> </action>
<action name="actionSave_conf"> <action name="actionSave_conf">
<property name="text"> <property name="text">
<string>Save conf</string> <string>Save Configuration</string>
</property>
</action>
<action name="actionChange_Media_Path">
<property name="text">
<string>Change Media Path</string>
</property>
</action>
<action name="actionInitMSEX">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Init</string>
</property>
</action>
<action name="actionIP_Address">
<property name="text">
<string>IP Address</string>
</property>
</action>
<action name="actionMake_Thumbs">
<property name="text">
<string>Make Thumbs</string>
</property> </property>
</action> </action>
</widget> </widget>

View file

@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License along with thi
Próximas versiones: Próximas versiones:
- Pure Data Video: Modularidad, sumar ventanas por instancias de PMS-video. NO SE PUEDE POR USAR LOS MISMOS PUERTOS. Opción de arranque?. Blending entre proyectores.Mirar ejemplo Gem multiprojection. Añdir shaders a la capa? - Pure Data Video: Modularidad, sumar ventanas por instancias de PMS-video. NO SE PUEDE POR USAR LOS MISMOS PUERTOS. Opción de arranque?. Blending entre proyectores.Mirar ejemplo Gem multiprojection. Añadir shaders a la capa?
- Pure Data Video: Cambiar alpha por glgs. Mirar ejemplos en doc de Gem. Mirar requerimientos de tarjetas gráficas. Añadir shaders glgs. - Pure Data Video: Cambiar alpha por glgs. Mirar ejemplos en doc de Gem. Mirar requerimientos de tarjetas gráficas. Añadir shaders glgs.
- GUI: Cuadro de diálogo en open/save para diferentes archivos de configuración. - GUI: Cuadro de diálogo en open/save para diferentes archivos de configuración.
- GUI: Mover la configuración de ip address a un menú. - GUI: Mover la configuración de ip address a un menú.