00001 /* 00002 * Copyright 2008-2010 Arsen Chaloyan 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 * 00016 * $Id: mpf_frame.h 1474 2010-02-07 20:51:47Z achaloyan $ 00017 */ 00018 00019 #ifndef MPF_FRAME_H 00020 #define MPF_FRAME_H 00021 00022 /** 00023 * @file mpf_frame.h 00024 * @brief MPF Audio/Video/Named-event Frame 00025 */ 00026 00027 #include "mpf_codec_descriptor.h" 00028 #include "mpf_named_event.h" 00029 00030 APT_BEGIN_EXTERN_C 00031 00032 /** Media frame types */ 00033 typedef enum { 00034 MEDIA_FRAME_TYPE_NONE = 0x0, /**< none */ 00035 MEDIA_FRAME_TYPE_AUDIO = 0x1, /**< audio frame */ 00036 MEDIA_FRAME_TYPE_VIDEO = 0x2, /**< video frame */ 00037 MEDIA_FRAME_TYPE_EVENT = 0x4 /**< named event frame (RFC4733/RFC2833) */ 00038 } mpf_frame_type_e; 00039 00040 /** Media frame marker */ 00041 typedef enum { 00042 MPF_MARKER_NONE, /**< none */ 00043 MPF_MARKER_START_OF_EVENT, /**< start of event */ 00044 MPF_MARKER_END_OF_EVENT, /**< end of event */ 00045 MPF_MARKER_NEW_SEGMENT /**< start of new segment (long-lasting events) */ 00046 } mpf_frame_marker_e; 00047 00048 /** Media frame declaration */ 00049 typedef struct mpf_frame_t mpf_frame_t; 00050 00051 /** Media frame */ 00052 struct mpf_frame_t { 00053 /** frame type (audio/video/named-event) mpf_frame_type_e */ 00054 int type; 00055 /** frame marker (start-of-event,end-of-event) mpf_frame_marker_e */ 00056 int marker; 00057 /** codec frame */ 00058 mpf_codec_frame_t codec_frame; 00059 /** named-event frame */ 00060 mpf_named_event_frame_t event_frame; 00061 }; 00062 00063 00064 APT_END_EXTERN_C 00065 00066 #endif /* MPF_FRAME_H */