Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,42 @@ | |||
#include "mms_plus.h" | |||
#include <stdio.h> | |||
|
|||
|
|||
static int mms_plus_default_video_index_cb(void) | |||
{ | |||
return -1; | |||
} | |||
|
|||
static int mms_plus_default_audio_index_cb(void) | |||
{ | |||
return -1; | |||
} | |||
|
|||
static int (*mms_plus_video_index_cb)(void) = mms_plus_default_video_index_cb; | |||
static int (*mms_plus_audio_index_cb)(void) = mms_plus_default_audio_index_cb; | |||
|
|||
int mms_plus_video_index(void) | |||
{ | |||
return mms_plus_video_index_cb(); | |||
} | |||
|
|||
int mms_plus_audio_index(void) | |||
{ | |||
return mms_plus_audio_index_cb(); | |||
} | |||
|
|||
void mms_plus_set_video_index_cb(int (*cb)(void)) | |||
{ | |||
if(cb != NULL) | |||
mms_plus_video_index_cb = cb; | |||
else | |||
mms_plus_video_index_cb = mms_plus_default_video_index_cb; | |||
} | |||
|
|||
void mms_plus_set_audio_index_cb(int (*cb)(void)) | |||
{ | |||
if(cb != NULL) | |||
mms_plus_audio_index_cb = cb; | |||
else | |||
mms_plus_audio_index_cb = mms_plus_default_audio_index_cb; | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
#ifndef AVFORMAT_MMS_PLUS_H | |||
#define AVFORMAT_MMS_PLUS_H | |||
|
|||
int mms_plus_video_index(void); | |||
int mms_plus_audio_index(void); | |||
|
|||
void mms_plus_set_video_index_cb(int (*cb)(void)); | |||
void mms_plus_set_audio_index_cb(int (*cb)(void)); | |||
|
|||
#endif | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters