2009-05-18 17:23:52 -07:00
|
|
|
diff --git a/media/liboggplay/include/oggplay/oggplay.h b/media/liboggplay/include/oggplay/oggplay.h
|
|
|
|
--- a/media/liboggplay/include/oggplay/oggplay.h
|
|
|
|
+++ b/media/liboggplay/include/oggplay/oggplay.h
|
2009-09-01 15:33:43 -07:00
|
|
|
@@ -110,16 +110,19 @@ oggplay_get_audio_channels(OggPlay *me,
|
|
|
|
|
|
|
|
OggPlayErrorCode
|
|
|
|
oggplay_get_audio_samplerate(OggPlay *me, int track, int *samplerate);
|
|
|
|
|
2009-05-18 17:23:52 -07:00
|
|
|
OggPlayErrorCode
|
|
|
|
oggplay_get_video_fps(OggPlay *me, int track, int* fps_denom, int* fps_num);
|
|
|
|
|
|
|
|
OggPlayErrorCode
|
|
|
|
+oggplay_get_video_aspect_ratio(OggPlay *me, int track, int* aspect_denom, int* aspect_num);
|
|
|
|
+
|
|
|
|
+OggPlayErrorCode
|
2009-09-01 15:33:43 -07:00
|
|
|
oggplay_convert_video_to_rgb(OggPlay *me, int track, int convert);
|
2009-05-18 17:23:52 -07:00
|
|
|
|
|
|
|
OggPlayErrorCode
|
|
|
|
oggplay_get_kate_category(OggPlay *me, int track, const char** category);
|
|
|
|
|
|
|
|
OggPlayErrorCode
|
|
|
|
oggplay_get_kate_language(OggPlay *me, int track, const char** language);
|
|
|
|
|
|
|
|
diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
|
|
|
|
--- a/media/liboggplay/src/liboggplay/oggplay.c
|
|
|
|
+++ b/media/liboggplay/src/liboggplay/oggplay.c
|
2009-09-01 15:33:43 -07:00
|
|
|
@@ -280,16 +280,45 @@ oggplay_get_video_fps(OggPlay *me, int t
|
2009-05-18 17:23:52 -07:00
|
|
|
|
|
|
|
(*fps_denom) = decode->video_info.fps_denominator;
|
|
|
|
(*fps_num) = decode->video_info.fps_numerator;
|
|
|
|
|
|
|
|
return E_OGGPLAY_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
OggPlayErrorCode
|
|
|
|
+oggplay_get_video_aspect_ratio(OggPlay *me, int track, int* aspect_denom, int* aspect_num) {
|
|
|
|
+ OggPlayTheoraDecode *decode;
|
|
|
|
+
|
|
|
|
+ if (me == NULL) {
|
|
|
|
+ return E_OGGPLAY_BAD_OGGPLAY;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (track < 0 || track >= me->num_tracks) {
|
|
|
|
+ return E_OGGPLAY_BAD_TRACK;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (me->decode_data[track]->decoded_type != OGGPLAY_YUV_VIDEO) {
|
|
|
|
+ return E_OGGPLAY_WRONG_TRACK_TYPE;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ decode = (OggPlayTheoraDecode *)(me->decode_data[track]);
|
|
|
|
+
|
|
|
|
+ if ((decode->video_info.aspect_denominator == 0)
|
|
|
|
+ || (decode->video_info.aspect_numerator == 0)) {
|
|
|
|
+ return E_OGGPLAY_UNINITIALISED;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ (*aspect_denom) = decode->video_info.aspect_denominator;
|
|
|
|
+ (*aspect_num) = decode->video_info.aspect_numerator;
|
|
|
|
+
|
|
|
|
+ return E_OGGPLAY_OK;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+OggPlayErrorCode
|
2009-09-01 15:33:43 -07:00
|
|
|
oggplay_convert_video_to_rgb(OggPlay *me, int track, int convert) {
|
2009-05-18 17:23:52 -07:00
|
|
|
OggPlayTheoraDecode *decode;
|
|
|
|
|
|
|
|
if (me == NULL) {
|
|
|
|
return E_OGGPLAY_BAD_OGGPLAY;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (track < 0 || track >= me->num_tracks) {
|