mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-09 09:19:58 +01:00
Fix warnings
This commit is contained in:
@@ -366,9 +366,6 @@ void MediaPlayer::seekTo(GstClockTime pos)
|
||||
if (!seekable_)
|
||||
return;
|
||||
|
||||
// remember pos
|
||||
GstClockTime previous_pos = position();
|
||||
|
||||
// apply seek
|
||||
GstClockTime target = CLAMP(pos, 0, duration_);
|
||||
execute_seek_command(target);
|
||||
@@ -674,7 +671,7 @@ GstFlowReturn MediaPlayer::callback_pull_sample_video (GstElement *bin, MediaPla
|
||||
return ret;
|
||||
}
|
||||
|
||||
void MediaPlayer::callback_end_of_video (GstElement *bin, MediaPlayer *m)
|
||||
void MediaPlayer::callback_end_of_video (GstElement *, MediaPlayer *m)
|
||||
{
|
||||
if (m) {
|
||||
// reached end of stream (eos) : might need to loop !
|
||||
@@ -684,7 +681,7 @@ void MediaPlayer::callback_end_of_video (GstElement *bin, MediaPlayer *m)
|
||||
|
||||
void MediaPlayer::callback_discoverer_process (GstDiscoverer *discoverer, GstDiscovererInfo *info, GError *err, MediaPlayer *m)
|
||||
{
|
||||
if (!m)
|
||||
if (!discoverer || !m)
|
||||
return;
|
||||
|
||||
// handle general errors
|
||||
@@ -775,7 +772,7 @@ void MediaPlayer::callback_discoverer_process (GstDiscoverer *discoverer, GstDis
|
||||
void MediaPlayer::callback_discoverer_finished(GstDiscoverer *discoverer, MediaPlayer *m)
|
||||
{
|
||||
// finished the discoverer : finalize open status
|
||||
if (m) {
|
||||
if (discoverer && m) {
|
||||
// no error message, open media
|
||||
if ( m->discoverer_message_.str().empty())
|
||||
m->execute_open();
|
||||
|
||||
@@ -254,9 +254,9 @@ private:
|
||||
bool fill_v_frame(GstBuffer *buf);
|
||||
|
||||
static GstFlowReturn callback_pull_sample_video (GstElement *bin, MediaPlayer *m);
|
||||
static void callback_end_of_video (GstElement *bin, MediaPlayer *m);
|
||||
static void callback_discoverer_process (GstDiscoverer *discoverer_, GstDiscovererInfo *info, GError *err, MediaPlayer *m);
|
||||
static void callback_discoverer_finished(GstDiscoverer *discoverer_, MediaPlayer *m);
|
||||
static void callback_end_of_video (GstElement *, MediaPlayer *m);
|
||||
static void callback_discoverer_process (GstDiscoverer *discoverer, GstDiscovererInfo *info, GError *err, MediaPlayer *m);
|
||||
static void callback_discoverer_finished(GstDiscoverer *discoverer, MediaPlayer *m);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -122,7 +122,6 @@ uint Resource::getTextureDDS(const std::string& path, float *aspect_ratio)
|
||||
// get the buffer = bytes [128 - ]
|
||||
const char *buffer = fp + 128;
|
||||
|
||||
uint components = (fourCC == FOURCC_DXT1) ? 3 : 4;
|
||||
uint format = 0;
|
||||
switch(fourCC)
|
||||
{
|
||||
@@ -163,8 +162,7 @@ uint Resource::getTextureDDS(const std::string& path, float *aspect_ratio)
|
||||
for (uint level = 0; level < mipMapCount && (width || height); ++level)
|
||||
{
|
||||
uint size = ((width+3)/4)*((height+3)/4)*blockSize;
|
||||
glCompressedTexImage2D(GL_TEXTURE_2D, level, format, width, height,
|
||||
0, size, buffer + offset);
|
||||
glCompressedTexImage2D(GL_TEXTURE_2D, level, format, width, height, 0, size, buffer + offset);
|
||||
glGenerateMipmap(GL_TEXTURE_2D);
|
||||
|
||||
offset += size;
|
||||
|
||||
Reference in New Issue
Block a user