#ifndef MEDIA_BASE_PIPELINE_STATUS_H_
#define MEDIA_BASE_PIPELINE_STATUS_H_
#include "base/callback.h"
#include <string>
namespace media {
enum PipelineStatus {
PIPELINE_OK = 0,
PIPELINE_ERROR_URL_NOT_FOUND = 1,
PIPELINE_ERROR_NETWORK = 2,
PIPELINE_ERROR_DECODE = 3,
PIPELINE_ERROR_DECRYPT = 4,
PIPELINE_ERROR_ABORT = 5,
PIPELINE_ERROR_INITIALIZATION_FAILED = 6,
PIPELINE_ERROR_COULD_NOT_RENDER = 8,
PIPELINE_ERROR_READ = 9,
PIPELINE_ERROR_OPERATION_PENDING = 10,
PIPELINE_ERROR_INVALID_STATE = 11,
DEMUXER_ERROR_COULD_NOT_OPEN = 12,
DEMUXER_ERROR_COULD_NOT_PARSE = 13,
DEMUXER_ERROR_NO_SUPPORTED_STREAMS = 14,
DECODER_ERROR_NOT_SUPPORTED = 15,
PIPELINE_STATUS_MAX = DECODER_ERROR_NOT_SUPPORTED,
};
typedef base::Callback<void(PipelineStatus)> PipelineStatusCB;
struct PipelineStatistics {
PipelineStatistics()
: audio_bytes_decoded(0),
video_bytes_decoded(0),
video_frames_decoded(0),
video_frames_dropped(0) {
}
uint32 audio_bytes_decoded;
uint32 video_bytes_decoded;
uint32 video_frames_decoded;
uint32 video_frames_dropped;
};
typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB;
}
#endif